[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (declare (type fixnum ---)) considered etc.
- To: common-lisp@SU-AI.ARPA
- Subject: Re: (declare (type fixnum ---)) considered etc.
- From: masinter.pa@Xerox.COM
- Date: Wed, 23 Jul 1986 19:45:00 -0000
- In-reply-to: <RAM.12224983442.BABYL@C.CS.CMU.EDU>
FLOAT is more portable than FIXNUM. Portable implementations which
generate single-float in one implementation will continue to generate
single-float in another implementation, even if the meaning of
single-float differs in the two implementations. There are few functions
that will propagate any change in the floating point precision of a
value from one declaration-type to another; if you have something that
deals exclusively in SINGLE-FLOAT, then * and + aren't suddenly going to
return an unexpected DOUBLE-FLOAT. With FIXNUM, the most innocuous *
might take something that is FIXNUM and produce a non-FIXNUM; the
boundary between FIXNUM and BIGNUM invisible to most of the language.
[two clarifications: in Xerox Common Lisp, the FIXNUM range is
(signed-byte 17), and FIXNUM declarations are ignored, because all of
the opcodes do generic arithmetic, so I didn't actually have to *do*
anything about the bogus FIXNUM declarations.]