[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
question about subtypep
Date: Monday, 25 August 1986 14:02-EDT
From: David A. Moon <Moon at STONY-BROOK.SCRC.Symbolics.COM>
Date: Thu, 14 Aug 1986 06:51 EDT
From: Rob MacLachlan <RAM@C.CS.CMU.EDU>
Although (THE SHORT-FLOAT 1F0) is quite legal in an
implementation in which SHORT-FLOAT and SINGLE-FLOAT are
identical, it would be reasonable for the compiler to give a warning
anyway. Applications that care about this sort of thing will have to
use a variant version of subtypep that is distinct from the real
SUBTYPEP.
They'll have to do more than that. If the user wrote
(THE SHORT-FLOAT 1s0) it would read as exactly the same Lisp object as
(THE SHORT-FLOAT 1f0) in an implementation where SHORT-FLOAT and
SINGLE-FLOAT are identical, so I don't see how the compiler could
distinguish these and give a warning for one but not for the
other.
I realized this was a bad example after I sent the message. Instead
1F0, substitute <any expression known to be SINGLE-FLOAT>. For
example, (THE SHORT-FLOAT (THE SINGLE-FLOAT ...)).
Rob