From owner-freebsd-hackers Sat Jul 14 11: 9:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.disney.com (mail.disney.com [204.128.192.15]) by hub.freebsd.org (Postfix) with ESMTP id 0ECD537B408 for ; Sat, 14 Jul 2001 11:09:28 -0700 (PDT) (envelope-from Jim.Pirzyk@disney.com) Received: from pain10.corp.disney.com (root@pain10.corp.disney.com [153.7.110.100]) by mail.disney.com (Switch-2.0.1/Switch-2.0.1) with SMTP id f6EI8cI13185 for ; Sat, 14 Jul 2001 11:08:38 -0700 (PDT) Received: from [172.30.50.1] by pain.corp.disney.com with ESMTP for freebsd-hackers@freebsd.org; Sat, 14 Jul 2001 11:10:18 -0700 Received: from plio.fan.fa.disney.com (plio.fan.fa.disney.com [153.7.118.2]) by pecos.fa.disney.com (8.11.3/8.11.3) with ESMTP id f6EI9Ns13082 for ; Sat, 14 Jul 2001 11:09:23 -0700 (PDT) Received: from snoopy.fan.fa.disney.com (snoopy.fan.fa.disney.com [153.7.117.170]) by plio.fan.fa.disney.com (8.9.2/8.9.2) with ESMTP id LAA15819 for ; Sat, 14 Jul 2001 11:09:22 -0700 (PDT) (envelope-from Jim.Pirzyk@mailhost) From: Jim.Pirzyk@disney.com Received: (from Jim.Pirzyk@localhost) by snoopy.fan.fa.disney.com (8.11.3/8.11.3) id f6EI9M809946 for freebsd-hackers@freebsd.org; Sat, 14 Jul 2001 11:09:22 -0700 (PDT) (envelope-from Jim.Pirzyk) Date: Sat, 14 Jul 2001 11:09:22 -0700 (PDT) Message-Id: <200107141809.f6EI9M809946@snoopy.fan.fa.disney.com> To: freebsd-hackers@freebsd.org Subject: math library difference between linux emulation and native freebsd (and native linux) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG So I have stumbled across a linux emulation bug in freebsd. Below is the program that returns different results based on FreeBSD, Linux or Linux emulation under FreeBSD. Running natively under FreeBSD: x = 53.27850000 exp(x) = 137581029243568449912832.00000000 Running natively under Linux: x = 53.278500 exp(x) = 137581029243568449912832.000000 Running under FreeBSD in Linux emulation mode: x = 53.27850000 exp(x) = 137581029243567812378624.00000000 #include #include #include int main (int argc, char **argv) { double x = 53.278500; printf ("x = %8lf\n", x); printf ("exp(x) = %8lf\n", exp(x)); exit (0); } There are only two shared libaries in common (libc and libm) and both are the same on FreeBSD (in /compat/linux) and Linux. So any ideas on where the program is going wrong? - JimP -- --- @(#) $Id: dot.signature,v 1.10 2001/05/17 23:38:49 Jim.Pirzyk Exp $ __o Jim.Pirzyk@disney.com ------------- pirzyk@freebsd.org _'\<,_ Senior Systems Engineer, Walt Disney Feature Animation (*)/ (*) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message