now it's possible! printing floating point numbers at compile-time

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Dec 30 13:38:04 UTC 2018


On Sun, Dec 30, 2018 at 03:26:33PM +0200, ketmar via Digitalmars-d-announce wrote:
> Basile B. wrote:
> 
> > On Sunday, 30 December 2018 at 12:19:19 UTC, ketmar wrote:
> > > too bad that i didn't knew about Ryu back than.
> > 
> > It's very recent, announce on proggit is < 1 year.
> > 
> > It would be nice to have one to format in phobos. RYU or Grisu3
> > doesn't matter much as long as the two issues that are
> > 
> > - CTFE formatting of floats
> > - formatting is identical on all platforms
> actually, there is a 3rd issue, which is often overlooked: conversion
> from string to float. to get a perfect roundtrip, this one should be
> done right too.
[...]

Doesn't hex output format (e.g. std.format's %a and %A) already solve
this?  It basically outputs the exact bits in hex. No room for error
there.


T

-- 
It said to install Windows 2000 or better, so I installed Linux instead.


More information about the Digitalmars-d-announce mailing list