[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exactness

Marcin 'Qrczak' Kowalczyk wrote:
> Suppose we have two flonums tagged as exact. You divide them, and the
> result is not a finite binary fraction, so the implementation can't
> use the same representation for the result. What should it do?
> a) Represent it in a flonum tagged as inexact.
> b) Represent it as an exact ratio of two integers.

I'd be inclined to use B, or some other exact representation.

> In case a) exactness of flonums would be almost useless, because most
> fp data except initial inputs would be inexact ....


> In case b) using flonums to represent exact numbers would be almost
> useless, because most exact data except initial inputs would be
> converted to ratios ....

Maybe. I'd need more information to say for certain. For some
implementations, those initial inputs may be reason enough. For example,
it may be more compact than representing the numbers internally as
rationals, or the flonum format may include useful irrational constants.

> I claim that the practical utility of numbers represented as fixnums,
> bignums or ratios but tagged as inexact is close to zero ....

Can't agree here, for reasons stated in the rest of the thread. It
appears that you are confusing "integral but inexact number" with "real
number" and drawing the incorrect conclusion that all inexact numbers
should be reals (i.e., flonums).
Bradd W. Szonye