[Openmcl-devel] Printing/reading INF and NaN without #<> or #.
gb at clozure.com
Sat Nov 12 15:08:18 EST 2005
Thanks. I don't know of any reason -not- to provide that extended syntax;
if anyone does, then I suppose that it could be made conditional somehow.
On a related note (and not intended to encourage debate on the advantages
of IEEE754): the keyword :IEEE-FLOATING-POINT is not present on *FEATURES*
in OpenMCL. Its absence should be interpreted as "no one involved in the
implementation has ever been confident in asserting that it conforms to
IEEE754" rather than "someone is confident that it doesn't."
Do people who write cross-platform CL floating-point code conditionalize
that code on #+/#-ieee-floating-point ? If so, does the absence of that
feature from OpenMCL's *FEATURES* pose problems for authors of such code ?
(The extra-credit question is "What exactly does it mean to conform
to IEEE754, how can this conformance be tested, and what if anything
would need to change in OpenMCL to achieve a level of conformance
that would justify adding :IEEE-FLOATING-POINT to *FEATURES* ?"
OK, I guess that that's at least 3 extra-credit questions ...)
On Sat, 12 Nov 2005, Dan Corkill wrote:
> OpenMCL currently uses a non-readable #<> notation to textually represent
> IEEE 754
> 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 as
> a convenient textual representation. Modified OpenMCL 1.0
> functions that provide this extended-syntax support for INF, -INF,
> and NaN can be found at:
> (Sorry, I don't have these as patches to the development sources.)
> We'd like to see this "extended" number syntax more widely
> adopted (allowing infinite values to be portably exchanged
> among CL implementations that support 754). [No IEEE 754
> advantage/disadvantage debates, please!]
> -- Dan Corkill
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel