-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Jan Hudec Sent: Wednesday, April 03, 2013 10:27 PM To: boost@lists.boost.org Subject: Re: [boost] Specific-Width Floating-Point Typedefs
On Thu, Mar 28, 2013 at 13:58:21 +0100, Bjorn Reese wrote:
On 2013-03-28 13:28, Paul A. Bristow wrote:
There has recently been some discussion on improving portability of programs using floating-point.
A common use case for fixed-length floats that you do not mention explicitly in your document is the exchange of floats over binary network protocols
That adds requirement that they be IEEE 754 formats though. While I don't know platform using any other format these days, I don't think C++ requires that just as it does not require two's complement for signed integers.
So there would have to be one set of typedefs for just size/precision and another for the IEEE 754 standard formats.
One could have both, but for simplicity, I think we only have IEEE 754 standard formats in mind (including the extended formats to get 128 bits - and up?). http://en.wikipedia.org/wiki/Extended_precision http://en.wikipedia.org/wiki/Quadruple_precision As you observe, hardly anyone is currently doing anything else, http://stackoverflow.com/questions/2234468/do-any-real-world-cpus-not-use-ie... so there is really no portability case. It doesn't seem worth making the names longer to distinguish the two cases. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com