toRational (0.9). Reply

Lennart Augustsson lennart@mail.augustsson.net
Wed, 18 Apr 2001 12:20:17 +0200


"S.D.Mechveliani" wrote:

> People wrote about   toRational (0.9) == 9%10  = False
>                      ...
> Probably, the source of a `bug' is a language agreement that the
> input is in decimal representation (`0.9') and its meaning is a
> floating approximation in _binary_ representation.

What are you talking about?  Input in decimal representation is
stored as a Rational number.  There is absolutely no loss of
precision.

    -- Lennart