|
Boost : |
Subject: Re: [boost] [multiprecision] Radix-2 typedef naming convention
From: John Maddock (john_at_[hidden])
Date: 2013-11-05 11:53:07
>Thank you for this astute observation. In fact, we already
>have a proposal for optional typedefs such as float32_t,
>float64_t, and float128_t. They are to be defined in the global
>and std namespaces, and they are to be placed in new headers
><stdfloat.h> and <cstdfloat>, respectively.
>
>Why not name the new radix-2 multiprecision types as follows?
>* boost::multiprecision::cpp_bin_float_24
>* boost::multiprecision::cpp_bin_float_53
>* boost::multiprecision::cpp_bin_float_113
>* and the one for octuple precision
Sorry but that doesn't really work either - up until now we have
consistently used:
float_type_N
to mean "Floating point type with at least N decimal digits", this is used
consistently not only in cpp_dec_float, but in binary floating point types
such as mpfr_float and mpf_float where we have typedefs such as:
typedef something mpfr_float_50;
typedef something mpfr_float_100;
Which each have enough binary digits to guarantee 50 and 100 decimal place
precision respectively.
So cpp_bin_float follows this and also has:
typedef something cpp_bin_float_50;
typedef something cpp_bin_float_100;
So bit counts have to use a different naming convention to avoid confusion.
How about:
cpp_bin_float_single;
cpp_bin_float_double;
cpp_bin_float_quad;
?
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk