Is there any platform we need to support that doesn't have IEEE floats?
Why do you ask? If you need to perform I/O of floating point values in binary IEEE format, there are already functions for that in sprintf/sscanf (which take advantage of the native format being IEEE when applicable, also taking endianness into consideration) which could be broken out for use elsewhere.
Well, apparently no one has attempted to compile that IEEE I/O code in 8.1 for a while. C99 says that floats are implemented according to IEEE when the hardware uses it, so the question is if there is ever a case where the C-code is needed.
On the other hand, the reason why I started to look at this is to be able to read and write 128-bit IEEE numbers, so I might need the code for that.
Well, apparently no one has attempted to compile that IEEE I/O code in 8.1 for a while.
Is it broken? In that case I can take a look at it.
C99 says that floats are implemented according to IEEE when the hardware uses it,
Where do you think it says that? The only part of C99 which mentions IEEE is Annex F (and G, covering complex numbers), which describes how floating point should behave in an implementation which defines __STDC_IEC_559__. An implementation not defining this preprocessor symbol is not covered by said annex, and can chose any floating point representation, regardless of hardware support.
Well, apparently no one has attempted to compile that IEEE I/O code in 8.1 for a while.
Is it broken? In that case I can take a look at it.
Already fixed.
C99 says that floats are implemented according to IEEE when the hardware uses it,
Where do you think it says that?
Apparently I misunderstood a derivative source.
It would be good enough under my assumption that it is never used. But then it would not need to compile either I suppose.
pike-devel@lists.lysator.liu.se