[Ecls-list] wrong value for (float-sign -0.0)
Waldek Hebisch
hebisch at math.uni.wroc.pl
Sun Sep 28 13:22:30 UTC 2008
Gabriel Dos Reis wrote:
>
> Hi Juanjo,
>
> ECL reports wrong value for the sign of -0.0.
>
> > *features*
> (:LINUX :FORMATTER :IEEE-FLOATING-POINT :RELATIVE-PACKAGE-NAMES :DFFI
> :CLOS-STREAMS :CMU-FORMAT :UNIX :ECL-PDE :DLOPEN :CLOS :BOEHM-GC :ANSI-CL
> :COMMON-LISP :ECL :COMMON :PENTIUM3 :FFI :PREFIXED-API)
> > (float-sign -0.0)
> 0.0
>
>
> The correct value is -1.0.
>
It seems that ECL does not support -0.0 (at least on input), which
is pretty reasonable thing for Lisp to do:
> (eq 0.0 -0.0)
T
So, the correct value is 1.0. Another thing is :IEEE-FLOATING-POINT
in the features: I personally would sugesst to have feature called
:IEEE-ROUNDING (or maybe :IEEE-FLATING-FORMAT) to indicate that IEEE
rounding and representation is used. I believe that most people
when they say that thay want IEEE really want standard format and
rounding rules while other parts starting from signed 0 (especially
Nans and denormals) are pretty controversial.
Of couse, ECL may decide to support signed 0.
--
Waldek Hebisch
hebisch at math.uni.wroc.pl
More information about the ecl-devel
mailing list