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

*To*: ELIOT%cs.umass.edu@RELAY.CS.NET, Jeff Barnett <jbarnett@NRTC.ARPA>, common-lisp@SU-AI.ARPA*Subject*: Rational Infinity*From*: David C. Plummer <DCP@QUABBIN.SCRC.Symbolics.COM>*Date*: Wed, 4 Feb 87 09:46 EST*In-reply-to*: The message of 3 Feb 87 12:42 EST from ELIOT%cs.umass.edu@RELAY.CS.NET, The message of 3 Feb 87 22:08 EST from Jeff Barnett <jbarnett@NRTC.ARPA>

I assume that if this becomes a real proposal, there would be trap-enable equivalents for rational infinities and rational NaNs analogous to IEEE trap enables for overflow, underflow, etc. For example, one possible syntax might be (with-rational-trap-enables ((:divide-by-zero :infinity)) (/ a b)) might return 1/0 or -1/0 silently, while (with-rational-trap-enables ((:divide-by-zero :error)) (/ a b)) would signal an error. In systems that have condition handling and/or proceed options, the program and/or user could decide to use +-1/0 if that seemed like a good thing to do at the time. Once generated (i.e., in the dataflow of the program), rational infinities don't cause further traps unless you divide two infinities or multiply an infinity by 0. For example, (sqrt 1/0) would return 1/0, (* 1/0 positive-number) would return 1/0, etc.

- Prev by Date:
**Rational Infinity** - Next by Date:
**Re: LALR Parser Generator Available?** - Previous by thread:
**Rational Infinity** - Next by thread:
**Re: Rational Infinity** - Index(es):