Printing floating points

Bruce Carneal bcarneal at gmail.com
Mon Jan 25 21:40:01 UTC 2021


On Monday, 25 January 2021 at 09:17:25 UTC, Ola Fosheim Grøstad 
wrote:
> On Monday, 25 January 2021 at 04:27:49 UTC, Walter Bright wrote:
>> On 1/22/2021 1:35 PM, deadalnix wrote:
>>> I looked. i can tell you it is not ryu. I would need to dive 
>>> much deeper into it to be confident to include this.
>>
>> One way is to randomly generate floating point bit patterns 
>> and compare the output with that of print formatting on C.
>
> You only need to test the boundary cases, so one can do this, 
> no problem.

My guess is that knowing what the actual boundary cases are is 
equivalent to having solved the original problem.  If I'm wrong, 
if it really is as you say "no problem", then the RYU author sure 
wasted a lot of time on the proof in his PLDI 2018 paper.

I also note that RYU's printf incompatibilities mentioned earlier 
in this thread seem to have been addressed.  A recent variant of 
RYU reportedly accommodates printf.



More information about the Digitalmars-d mailing list