[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: My comments
"Bradd W. Szonye" <bradd+srfi@xxxxxxxxxx> writes:
>> I would reject the concept of inexact integers ....
> While they seem silly for small integers, inexact integers make
> sense for huge values. For example, people often round huge integers
> to the nearest million or billion.
R5RS tries to make exactness an independent property from the value.
IMHO it goes too far in allowing inexact arguments to certain
Let's consider R5RS operations defined on integers which might be
inexact (I think these are all):
A. odd? even? integer->char
B. quotient remainder modulo
C. gcd lcm
and operations defined on rationals which also might be inexact:
D. numerator denominator
Operations from group A have ill-defined results when the accuracy
of the input is worse than 1. Operations from groups C and D have
ill-defined results when the inputs are not known exactly: the
slighthest inaccuracy in the input yields a totally different answer.
R5RS gives them too broad domain.
Operations from group B are well defined even for real numbers,
except for boundary cases. They are continuous on intervals.
R5RS gives them too narrow domain.
In no case "an integer number, known exactly or not" or "a rational
number, known exactly or not" is a sensible domain for an arithmetic
__("< Marcin Kowalczyk