[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(= 4 4.0)
Date: Mon, 23 May 94 16:01:20 -0400
From: Aubrey Jaffer <jaffer@martigny.ai.mit.edu>
Close. I already have an implementation with exact integers and
inexact complexes. My QUOTIENT, REMAINDER, MODULO, GCD, LCM, ODD?,
and EVEN? don't accept inexact arguments. I think if I make (= 4 4.0)
==> #f I will be much closer to conformance in this area.
It is not easy to support them if arithmetic is not done with generic
type dispatch. My QUOTIENT, REMAINDER, MODULO, GCD, LCM, ODD?, and
EVEN? cannot coerce to exact integers if bignums are not available,
so separate code would have to be written to support them.
A better way to do this would be to recognize that you have been given
an inexact integer and to signal an error. This is explicitly allowed
and is closer to the intent of the report.
(No, I don't think this shows the benefit of generic arithmetic.
Computing GCD of inexacts makes as much sense to me as asking if an
inexact is PRIME?)
Computing the GCD of inexact integers makes as much sense as computing
it for exact integers. The purpose of the exactness bit is to
propagate information about how a given number was derived. If these
integers were derived from inexact reals (say, as the result of FLOOR)
then it is appropriate for them to be inexact because the
implementation cannot prove that they are the correct integer.