Martin Davis wrote: > Here's the Java spec on use of FP numbers: > > http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.h > tml#9249 > > It always uses IEEE754 format. But as I understand it, IEEE754 has some > subtle complexities involving rounding modes and hidden bits on some > platforms (e.g. Intel), so even this pretty detailed spec may not mean > that evey Java implementation computes in exactly the same way.
Float point arithmetic in IA-32 CPUs is not compatible with IEEE 754. Here is what I was told by one of my friend that knows this issue well: CPU always uses extended double irrespective of settings of accuracy. The float value is converted only when the data is going to be saved from FPU stack to the memory. Note also to Sandro: And here, in case of inlining, can force usage of thread stack to pass arguments instead of FPU registers. That can be the inlining/not inlining issues that Sandro has revealed. Cheers -- Mateusz Loskot http://mateusz.loskot.net _______________________________________________ geos-devel mailing list geos-devel@geos.refractions.net http://geos.refractions.net/mailman/listinfo/geos-devel