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

Paul Zimmermann Paul.Zimmermann at inria.fr
Wed Jun 17 08:56:52 PDT 2020


       Steve,

> From: "Steve (Numerics) Canon" <scanon at apple.com>
> Date: Wed, 17 Jun 2020 10:59:47 -0400
>
> >  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).

good point. I conjecture the exact bound is 112, attained for 7136239*2^-149.

Paul


More information about the Cfp-interest mailing list