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

*To*: hpfclp!paul%hplabs.csnet@CSNET-RELAY.ARPA*Subject*: float-digits*From*: "Scott E. Fahlman" <Fahlman@CMU-CS-C.ARPA>*Date*: Tue, 12 Mar 1985 14:47:00 -0000*Cc*: common-lisp@SU-AI.ARPA*In-reply-to*: Msg of 12 Mar 1985 05:53-EST from hpfclp!paul%hplabs.csnet at csnet-relay.arpa*Sender*: FAHLMAN@CMU-CS-C.ARPA

Paul, Floating point hackery is not my specialty, but maybe I can give you a quick answer that will stand unless one of the real experts pops up to contradict me. What is the result of (float-digits 0.0)? Float-digits tells you how many radix-b digits there are in the representation of the fractional part (the "significand") of the type of number you feed it. It doesn't care at all about the value of the argument, just about which type of float it is. So in this case, it tells you the number of digits (usually bits) in the significand of a number of the default floating type, as controlled by *read-default-float-format*. Why isn't "float-radix" a constant? Float-radix may in principle be different for different types of floats in the same implementation, though I don't know of any existing implemenation that does this. By making it a function, we allow the user to ask for the float-radix of some particular type of number: the type of the argument. -- Scott

- Prev by Date:
**float-digits** - Next by Date:
**DO-SYMBOLS: duplicates and shadowings** - Previous by thread:
**float-digits** - Next by thread:
**DO-SYMBOLS: duplicates and shadowings** - Index(es):