**DONOTDELETE**
(Unregistered)
11/03/03 04:38 AM
Re: some more on that

For example:

http://developer.java.sun.com/developer/bugParade/bugs/4857011.html

Which has a really good reply I would say, so I'm not sure what Jeff means with " submitted some bug reports to Sun about this serious performance regression, but received no meaningful response".

"
Example in there: The value of sine for the floating-point number Math.PI is around

1.2246467991473532E-16

while the computed value for the algorithm used in java 1.3.1 is

1.2246063538223773E-16
^

In other words, the returned result is only accurate to about 5 digits
instead of the full 15-17 digit precision of double. Instead of a 1/2
ulp or 1 ulp error, the error is about 1.64e11 ulps, over *ten
billion* ulps."


Accurate to the fifth digit only in that example is not very good, but as they also say, might be enough in some circumstances, but hardly something to aim for in a math lib!

The x87 FPU fsin and fcos gives these bad results and maybe that C-program uses them and gives the same bad results (old instructions, designed before "modern" algorithms, see bug report)




Contact us JavaWorld

Powered by UBB.threads™ 6.5.5

Featured White Papers


RESEARCH CENTERS: Java Standard Edition | Java Enterprise Edition | Java Micro Edition | Development Tools
About Us | Advertise | Contact Us | Terms of Service/Privacy
Copyright, 2006-2008 Network World, Inc. All rights reserved.