bernhold@qtp.ufl.edu (David E. Bernholdt) (03/06/90)
I use Sun systems, which follows the ANSI/IEEE 754-1985 standard for floating point arithmetic. Sun provides a number of functions to manipulate the actions of the system. For example, the Fortran functions ieee_flags ieee_handler sigfpe and the include file <f77/f77_floatingpoint.h> They also provide things like gradual_underflow() abrupt_underflow() which can turn on or off the standard IEEE handling of underflows in order to save comuptation time, and ieee_retrospective which can be called anywhere to provide a summary of the IEEE exceptions which have occurred so far. Are these routines available on all machines which follow IEEE floating point? Do they have the same names or just similar functionality? Unfortunately, I don't have access to any other IEEE machines to look at. Any help is appreciated. -- David Bernholdt bernhold@qtp.ufl.edu Quantum Theory Project bernhold@ufpine.bitnet University of Florida Gainesville, FL 32611 904/392 6365
phd_ivo@gsbacd.uchicago.edu (03/07/90)
In article <938@orange19.qtp.ufl.edu>, bernhold@qtp.ufl.edu (David E. Bernholdt) writes...
+Are these routines available on all machines which follow IEEE
+floating point? Do they have the same names or just similar
+functionality? Unfortunately, I don't have access to any other IEEE
+machines to look at. Any help is appreciated.
+--
We wish. Sun's support of IEEE functions is VERY GOOD compared to
other workstations. In particular, my NeXT computer---which is almost
completely like a Sun-3---has no IEEE support whatsoever. Neither
does any other computer using Gnu-CC as its compiler.
/ivo welch ivo@next.agsm.ucla.edu
weaver@weitek.WEITEK.COM (03/08/90)
In article <938@orange19.qtp.ufl.edu> bernhold@qtp.ufl.edu (David E. Bernholdt) writes: > >I use Sun systems, which follows the ANSI/IEEE 754-1985 standard for >floating point arithmetic. Sun provides a number of functions to >manipulate the actions of the system. For example, [....] >Are these routines available on all machines which follow IEEE >floating point? Do they have the same names or just similar >functionality? Bad news: o IEEE-754 specifies that some way must be provided to do some of these things (ieee_flags, ieee_handler, ieee_retrospective), but says nothing about Fortran or what names these things will have. (IEEE-754 requires that underflow be gradual.) o To my knowlege, no standard exists on the Fortran routines for control of IEEE floating point. o Some vendors have advertised 'IEEE-format' floating point. This means the interpretation of the bits in a number follow IEEE-754, but things like rounding and exceptions may not. Good News: o IEEE-754 is short (18 pp), readable and not grossly expensive ($15-$20 I think). Vendor's documentation may be easier to understand after reading the standard. --Michael Weaver.