Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jul 2001 13:29:35 -0500
From:      Stephen Montgomery-Smith <stephen@math.missouri.edu>
To:        jmcoopr@webmail.bmi.net
Cc:        Jim.Pirzyk@disney.com, freebsd-hackers@FreeBSD.ORG
Subject:   Re: math library difference between linux emulation and native freebsd  (and native linux)
Message-ID:  <3B508F8F.1AB674C6@math.missouri.edu>
References:  <200107141819.LAA06370@smtp.bmi.net>

next in thread | previous in thread | raw e-mail | index | archive | help
jmcoopr@webmail.bmi.net wrote:
> 
> In <200107141809.f6EI9M809946@snoopy.fan.fa.disney.com>, on 07/14/2001
>    at 11:09 AM, Jim.Pirzyk@disney.com said:
> 
> >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
> 
> 
> My guess is difference between Linux emulation and "native" 's floating
> point formatting for printf.  With the number of significant digits
> you're invoking, small differences in handling low order bits can be
> significant.
> 

You could check this out by trying the following

double x,y;

x = 53.278500;
y = exp(x);
for(i=0;i<sizeof(double);i++)
  printf("%d ",((unsigned char*)y)[i]);
printf("\n");

or something like that.

-- 
Stephen Montgomery-Smith
stephen@math.missouri.edu
http://www.math.missouri.edu/~stephen

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B508F8F.1AB674C6>