Avik’s Ruminations

Musings on technology and life by Avik Sengupta

Java Floating Point

without comments

“How Java’s Floating Point hurts everyone everywhere”:http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf was written in 1998, and I’ve seen a reference to it every now and then. Makes as much of a fascinating read today as it was six years ago. Apart from a critique of Java’s floating point implementations, its also a reasonably good overview of the pleasures and pain of numerical analysis. Did you know that you could get completely different solutions to complex functions depending on how your compiler treats the difference between +0 and -0.
What has struck me most, is that it seems one needs to be knowledgeable in “linear algebra”:http://en.wikipedia.org/wiki/Linear_algebra as well as “computer architecture”:http://en.wikipedia.org/wiki/Computer_architecture – as classic a case of “leaky abstractions”:http://www.joelonsoftware.com/articles/LeakyAbstractions.html as one can get.

Written by

July 19th, 2004 at 9:41 pm

Posted in Technology