
On Thu, Sep 8, 2011 at 7:50 AM, Vitaly Budovski <vbudovski+news@gmail.com> wrote:
On 8 September 2011 21:31, Beman Dawes <bdawes@acm.org> wrote:
Several others have also expressed interest in FP, so I'll give it a try. Issues:
* Because FP formats vary, just dealing with endianness doesn't ensure portability. * The endianness of FP and integer values differs on some platforms, so we will have to build up a config file with separate entries for each platform, and that will take time to mature. * Ditto FP sizes. * I'm only willing to provide conversion.hpp FP support. Providing types that mimic FP types is far beyond my knowledge of how to deal with floating point's notorious arithmetic issues.
I would also like to add my +1 for float support. You could limit support to IEEE754 format (32 bit, 64 bit).
The plan is to support the most common platforms. I suspect that's IEEE754 format (32 bit, 64 bit), but I haven't had a chance to check yet.
I'm not sure how widespread differing endianness between ints and floats is across the various platforms.
The Wikipedia article says it's uncommon, IIRC, but we need some real data on that.
Would it be acceptable to provide a #define that will cause ints and floats to be treated as having reversed endianness relative to each other (i.e. if native int is little-endian, float would be big-endian)?
Yes, and that might be a good way to deal with less common platforms until our config file coverage matures. Thanks, --Beman