chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] CR: Division by inexact zero should return infinit


From: John Cowan
Subject: Re: [Chicken-hackers] CR: Division by inexact zero should return infinity/nan
Date: Thu, 25 Aug 2011 06:22:31 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

Peter Bex scripsit:

> According to the Hyperspec, this is actually not even defined; it says
> an implementation *might* raise an error on zero.  Returning inf or nan
> is allowed too.  I guess your favorite implementation just doesn't.

abcl 0.26.2 returns infinity or NaN
clisp 2.44.1 throws an error
cmucl snapshot-2011-06 throws an error
ccl 1.7-r14925M throws an error
ecl 1.11.1 returns infinity or NaN
gcl 2.6.7 throws an error
sbcl 1.0.29.11.debian throws an error

Note that there is no standard representation of either infinity or NaN
in CL.  Both abcl and ecl print a rereadable representation of infinity
(unfortunately not the same one) and a non-rereadable representation of NaN.

> We are, since we compile to C, which (AFAIK) is explicitly tied to IEEE
> floating point representation and semantics.  

Neither C89 nor C99 are tied to IEEE.

-- 
As we all know, civil libertarians are not      John Cowan
the friskiest group around --comes from         address@hidden
forever being on the qui vive for the sound     http://www.ccil.org/~cowan
of jack-booted fascism coming down the pike.           --Molly Ivins



reply via email to

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