[geos-devel] DoubleBits and IEEE-754
strk at refractions.net
strk at refractions.net
Tue Nov 2 11:18:34 EST 2004
I've found and fixed a bug in DoubleBits class.
It handles operations on doubles using knowledge of their
format (ieee-754).
Since double type internal format is not guaranteed to conform
to the standard I've also provided a fall-back implementation,
but that is prone to round-off errors. Detection of the required
format is performed checking for the __STDC_IEC_559__ define, which
should be non-0 if the format is available.
There might also be ENDIANNES problems, which I did not consider
yet. Basically the DoubleBits class makes bitwise operations on
the provided double, so byte order is important, probably assumed
as LITTLE_ENDIAN (am I right Martin?).
--strk;
More information about the geos-devel
mailing list