3 ms·
You don't understand what IEEE floating point numbers are. IEEE 754 specifies a binary representation. There is no "normal" floating point literal notation. Th
by sedachv 8y ago
You don't understand what IEEE floating point numbers are.
IEEE 754 specifies a binary representation. There is no "normal" floating point literal notation. There are numbers in decimal or scientific notation, nothing about which will tell you what kind of internal representation the number should have (not even whether it should be floating point or not). You have to add syntax extensions (this is how Common Lisp does it: http://clhs.lisp.se/Body/02_cbb.htm http://clhs.lisp.se/Body/02_cbb.htm) or pick an arbitrary representation. Is setting a variable to pick a representation more troublesome or "can go wrong more easily" that setting any other kind of variable for you, or is there something special about that particular variable? You might as well complain that the default Common Lisp reader/printer does not handle C99 hex float literals.
- deleted 8y ago[deleted]
- kazinator 8y ago> You have to add syntax extensions (this is how Common Lisp does it: http://clhs.lisp.se/Body/02_cbb.htm http://clhs.lisp.se/Body/02_cbb.htm) or pick an arbitrary representation. If an unadorned numeric token such as 2.7 generates a single-precision float (32 bit IEEE 754), that is a problem. There are good justifications why the default representation should be the 64 bit double. The 32 bit single precision has too small a range and precision for general use; it is suitable mainly for saving space in large arrays. We shouldn't have to use an extra suffix to indicate that we don't want that type, but rather the common double. Even C gets this right.