Implement the "unum" representation in D ?

Chris Williams yoreanon-chrisw at yahoo.co.jp
Fri Feb 21 09:27:04 PST 2014


On Friday, 21 February 2014 at 09:04:40 UTC, Ivan Kazmenko wrote:
> I believe that the repeating decimals, or better, repeating 
> binary fractions, will hardly be more useful than a rational 
> representation like p/q.

Yeah, in retrospect I would say that a binary layout like:

numberator length | +- | numerator | divisor

Might be a stronger solution, or at least one which offers 
different advantages over what we have today. It still wouldn't 
be able to represent pi accurately, since it isn't a rational 
number, but I wouldn't be surprised if a rational number exists 
that could be represented than can be represented in IEEE format.


More information about the Digitalmars-d mailing list