[EMAIL PROTECTED] wrote:
> 
> 
> >I also tried the same experiment with sin and gamma - then the problem
> >does not occur.  Well except that the answer for gamma(53.278500) is
> >reported as 157.464664 which is way wrong.
> 
> >When I tried it for x=52 they gave almost the same answer, only
> >seperated by the last bit (the decimal versions were reported as the
> >same).  For x=54 they both gave the same wrong answer 160.331128.
> 
> >I don't know a whole lot about IEEE.  What is the largest number it is
> >supposed to handle?  Looking at man math it says it should handle
> >numbers as large as 1.8e308 - we certainly are not in that range!!!
> 
> But remember, floating point is DIFFERENT--nothing is exact.  You can
> create a number with a magnitude about 1.8e308, but you sure don't get
> 308 significant digits.

You missed my point (or I didn't explain it well).  I was wondering if
the problem was because we were dealing with such large numbers that the
arithmetic got out of wack.

exp(54) = 160.331128 is way way wrong, by orders of magnitude.  Same for
gamma(53.27850) = 157.464664.  My point is that the correct answers are
way less than 1e308, so there is no excuse for the wrong answers.

By the way, Mathematica, which is Linux binary running under emulation,
gets the answers correct.

-- 
Stephen Montgomery-Smith
[EMAIL PROTECTED]
http://www.math.missouri.edu/~stephen

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to