iota to array

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Feb 27 06:07:01 UTC 2018


On Mon, Feb 26, 2018 at 07:50:10PM -0700, Jonathan M Davis via Digitalmars-d-learn wrote:
[...]
> One case that I found interesting was that in writing
> core.time.convClockFreq so that it didn't require floating point
> values, it not only avoided the inaccuracies caused by using FP, but
> it even was able to cover a larger range of values than FP because of
> how it splits out the whole number and fractional portions to do the
> math.
[...]

It would be nice to have a standard rational / fractional number library
in Phobos.  It's a pretty common need.  IIRC, somebody wrote one some
time ago.  I wonder if it's worth pushing it into Phobos.


T

-- 
War doesn't prove who's right, just who's left. -- BSD Games' Fortune


More information about the Digitalmars-d-learn mailing list