From: James Y K. <fo...@fu...> - 2005-11-12 21:52:52
|
On Nov 12, 2005, at 12:34 PM, Dan Corkill wrote: > SBCL currently uses read-time evaluation (#.) forms to textually > represent > infinite values. We needed to be able to print/read these values > without > *read-eval* enabled. Lispworks uses a simple, extended number > syntax to encode IEEE 754 values (e.g., 1e++0 for INF) that we like > and > would like to see more broadly adopted. Modified SBCL 0.9.6 > functions that provide this extended-syntax support for INF, -INF, > and NaN can be found at: > http://dancorkill.home.comcast.net/sbcl-inf.lisp > (Sorry, I don't have these as patches to the development sources.) 1e++0 and -1e++0 seem like really bad representations for +-inf, as they are completely meaningless to most anyone who might see one. That 1e+-0 is the representation for NaN doesn't make things any better. And what's with only outputting the trapping-ness of the NaN in a comment? That's kinda weird. Following the examples of the above, surely a trapping NaN should be -1e+-0. Ugh. Of course, outputting a comment after every NaN does help with the "what the hell is this" problem. James |