[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: navajo!Masinter.pa%Xerox.COM@navajo.stanford.edu
- Subject: Rational infinities
- From: firstname.lastname@example.org (Jon L White)
- Date: Fri, 6 Feb 87 19:47:04 PST
- Cc: email@example.com
- In-reply-to: navajo!Masinter.pa@Xerox.COM's message of 6 Feb 87 12:03 PST
Re: b) it is reasonable to want to define an operation as working on, say,
integers including +infinity and -infinity, but not arbitrary other
ratios. That is, the infinities are more an extension of the integer
type than the ratio type.
Since we currently have
(deftype rational () '(or integer ratio))
then I can't see any benefit to adding a new type that can be compared
with integers, but not with ratios; nor can I see any implementational
benefit to having separate "integer infinities" and "rational infinities".
However, I'm not so much concerned with the implementational details as
with the semantics. For example, If rational infinities answer "false"
to rationalp, then for symmetry shouldn't we require that floating-point
infinities answer "false" to floatp?
Of course, "contagion" rules should apply so that floating-point infinities
can be compared-with/combined-with rational infinities. I think it's ok if
(+ 3/2 <+float-infinity>)
answers "true" to floatp; but I don't want
(/ 10 0)
to give me a floating-point number under any circumstances; and I would
(max 3 <+rational-infinity>)
be "rationalp" rather than merely numberp.
Now, the significant question is what to do about complex infinities.
I have some current needs for the two rational infinities -- one of
which is to model floating-point exactly -- but I don't have any ideas
at all about the complex domain. Do you?
-- JonL --