Someplace on the web, Kahan discusses the Java floating-point
model, which is supposed to guarantee that results are the same
on all processors. This means, among other things, that when
processing a chained double-precision calculation, the compiler
may not store intermediate results in extended-precision
registers, even if they should happen to be available. Kahan
excoriates Java for this "feature."
In Fortran, nothing *requires* a compiler to make use of
extended-precision registers if they are available.
Whether a compiler does so or not can be viewed as a QoI
(Quality-of-Implementation) issue. As this discussion
has demonstrated, intelligent and well-meaning people can
disagree about which I has the higher Q.
My guess is that most people doing numeric programming would
like compilers to take advantage of the greatest precision
the underlying hardware can accommodate, subject to language-
standard conformance.
But the fact that the language standard allows compilers
considerable latitude in this regard makes analysis difficult,
especially when asking, "Is the loss of precision exhibited
by Compiler X a bug or a feature?"
-P.
--
Peter S. Shenkin Schrodinger, Inc.
VP, Software Development 120 W. 45th St., 32nd Floor
646 366 9555 x111 Tel New York, NY 10036
646 366 9550 FAX [log in to unmask]
http://www.schrodinger.com
Pre-arranged conf. calls: 702-759-8420 or 888-867-7084; passcode 646-366
|