This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, gfortran testsuite]: Do not load denormals in gfortran.fortran_torture/intrinsic_nearest.f90


On Aug 21 2009, Uros Bizjak wrote:
On 08/21/2009 07:09 PM, Tobias Burnus wrote:

It is not nice to upset FP hardware of various target architectures by
generating denormalized single-precision FP numbers [1] in the
testsuite. ...

For interested readers, here is what happens when IEEE single denormals are loaded in alpha, see section 2.2.6.1, S_Floating from "Alpha
Lastly, note that the latest
Architecture Handbok, v4" [1]:

It's not just single precision, it's not just denormalised numbers, it's not just the Alpha, and it's not just hardware.

Most HPC systems use hard underflow, because it is faster. [Aside: it's
numerically as good, too, but that is another matter. ]  It's asking for
trouble to load a denormalised number into software that isn't designed
to handle it (even if the hardware does) and often causes a surprising
amount of chaos.

For similar reasons, infinities and NaNs shouldn't be generated for hardware
or software that does not support them, even if they are representable.
The resulting chaos will startle most programmers.  And note that the Alpha
and perhaps some other systems have the concept of invalid numbers, which
are a much, much stronger concept than a NaN.

While systems that have the concept of unnormalised numbers (e.g. System/370) are probably dead, IEEE 754 has now introduced them (under the concept of cohorts) into its decimal floating-point representation. God alone knows what conventions will arise on how that is used, if indeed it is used and does not simply go down like a lead balloon.


Regards, Nick Maclaren.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]