gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] printing IEEE 754 special values (inf, nan)


From: Robert Dodier
Subject: Re: [Gcl-devel] printing IEEE 754 special values (inf, nan)
Date: Wed, 29 Jun 2005 19:34:29 -0700 (PDT)

Hello Camm,

> Greetings!  I could probably implement 'Inf' an 'NaN' as the print
> forms of these float pretty trivially -- the question is whether the
> reader must be modified to read them in, and what are the compliance
> issues if any.

Well, maybe some special symbols can be defined so
that floating point inf, -inf, and nan are printed as
those symbols.

For comparison, CMUCL has #.EXT:DOUBLE-FLOAT-POSITIVE-INFINITY,
#.EXT:DOUBLE-FLOAT-NEGATIVE-INFINITY, and #<DOUBLE-FLOAT Quiet NaN>.
This last one is unreadable, right? I'm guessing that's
because nan is not a single bit pattern but a range of bit patterns.
However, I don't see why nan couldn't be read as a specific
value; all nan's have the same properties.

Once +/- inf or nan is computed in GCL, it seems to have
the right properties -- inf + inf => inf, inf - inf => nan,
nan = nan => nil, nan != nan => t, etc.
Although I did notice nan < nan => t -- should be nil.
Also, I didn't try to exhaustively test all properties.

Thanks for your help,
Robert Dodier


                
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]