Re: Supporting IEEE 754 [exceptions] (in a front end [gfortran])

2008-11-29 Thread Tobias Burnus
Joseph S. Myers wrote: >> My biggest issue is that I don't see how I can compile-time evaluate the >> following - or how to evaluate it at all: >> >> if (IEEE_SUPPORT_NAN(x)) &! should be always true (or false) on a >> given system >> > See MODE_HAS_NANS etc. in real.h > Thanks. There I

Re: Supporting IEEE 754 [exceptions] (in a front end [gfortran])

2008-11-29 Thread Joseph S. Myers
On Sat, 29 Nov 2008, Tobias Burnus wrote: > While (a) and (b) can be easily handled in the front end, I don't see > how I can handle the rest efficiently. Most parts are provided by > fenv.h, for which I seemingly have to write a wrapper function (in > libgfortran) as the typedefs and constants ca

Re: Supporting IEEE 754 [exceptions] (in a front end [gfortran])

2008-11-29 Thread Steve Kargl
On Sat, Nov 29, 2008 at 09:41:30PM +0100, Tobias Burnus wrote: > > I'm thinking about how to implement Fortran 2003's IEEE support in > gfortran. The IEEE allow > a) To set an IEEE value (NaN, INF, etc.) > b) Check whether a value is NaN, etc. > c) To query for IEEE capabilities (IEEE_SUPPORT_NAN,

Supporting IEEE 754 [exceptions] (in a front end [gfortran])

2008-11-29 Thread Tobias Burnus
Hello, I'm thinking about how to implement Fortran 2003's IEEE support in gfortran. The IEEE allow a) To set an IEEE value (NaN, INF, etc.) b) Check whether a value is NaN, etc. c) To query for IEEE capabilities (IEEE_SUPPORT_NAN, IEEE_SUPPORT_SQRT (a sqrt() which has IEEE exception support), etc.