Arnstein Ressem wrote:
Hi,
I have run into a problem with the boost xml serialization of overflowing floats. On Linux these are being serialized as 'inf' into the xml files, but when reading the float back in it results in stream errors. I have searched the archives to find an answer to this, but without luck. The small program below has been compiled and run on 32-bit and 64-bit Linux (RedHat Enterprise Linux 4) with boost 1.33.1 and 1.34.1. In every case it results in a stream error and the float can not be read back in from the xml file.
Does anyone know if this is supposed to work ?
I had a similar problem (serialising NaNs - it turned out I had accidentally left some of my variables uninitialised), and there was a big discussion about serialising NaNs and infinities about a year or so ago. I seem to remember that the outcome was this could not be supported across all platforms, although I could be wrong. Could someone point this discussion out in the archives? Paul