[Cfp-interest 1645] Re: C++ floating-point work

Steve (Numerics) Canon scanon at apple.com
Wed Jun 17 07:59:47 PDT 2020


> On Jun 17, 2020, at 10:41 AM, David Olsen <dolsen at nvidia.com> wrote:
> 
>  But _Float32 is (I assume, I haven't verified) a subset of _Decimal64.

It is not. Consider 8388617/8388608. This is exactly representable in Float32 (0b1.00000000000000000001001 * 2^-23), and requires 24 decimal digits to represent exactly (1.00000107288360595703125). Very small Float32 values can require quite a bit more digits to represent exactly in decimal (a slightly conservative upper bound is something like 113).

– Steve


More information about the Cfp-interest mailing list