Tracy Harms wrote:
> The valuable sort of examination can be found in the
> following paper, for example:
>
>
> How Java's Floating-Point Hurts Everyone Everywhere
> by W. Kahan and J. D. Darcy (March 1998)
>
> http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf
>
>

I am glad to see someone else is reading Kahan:  I have suggested his
work several times and never got any response.  His style makes him
look like a crank, but he is not: he is the driving force behind the
IEEE 754 standard, and he got the Turing Award in 1989 for his work on
numerical analysis.

The main points in this article that are relevant to J and floating-point
discussions in the J forums are:

1. Fortran-style complex numbers and failing to distinguish betwee
+/-0 lead to some numerical problems in physically important contexts.

2. Java's insistence on exact reproducibility precludes
hardware-dependent optimizations (e.g. for matrix multiplication).
I have advocated some hardware considerations for J in the past.

3. The section "Prevalent Misconceptions about Floating-Point
Arithmetic" starting on page 25 should be required reading.

4. Ditto the discussion (starting on page 32) of precision v accuracy,
and why a number has neither.

5. The use of 80-bit long doubles (present in recent Intel 32-bit
architecture) is discouraged by Microsoft under the banner of
compatibility.  The MS compilers turn off the extra 11 bits of
precision.

6. Spurious compiler optimizations can affect numerical precision.
Being interpreted, J avoids most of these problems, but they may show
up in special code.

Best wishes,

John


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to