If a bignum exceeds the largest representable single-float, EQUALP will raise a type-error when comparing it to a single-float. The same problem happens with double-floats.
I am reporting this because my understanding of CLHS http://www.lispworks.com/documentation/lw51/CLHS/Body/f_equalp.htm#equalp tells that EQUALP is not supposed to raise errors at all: "Exceptional Situations: None."
How to reproduce:
;; =========== double-floats =========== (= (ash 1 1024) most-positive-double-float) NIL
(equalp (ash 1 1024) most-positive-double-float) ; Evaluation aborted on #<TYPE-ERROR {215F90FE}>.
;; =========== single-floats =========== (= 340282360000000000000000000000000000000 0.0f0) NIL
(equalp 340282360000000000000000000000000000000 0.0f0) ; Evaluation aborted on #<TYPE-ERROR {1CFFC364}>.
In attachment the detailed stacktrace and a proposed patch to fix this problem.
Regards,
Massimiliano Ghilardi
_______________________________________________ Armedbear-devel mailing list Armedbear-devel@common-lisp.net http://mailman.common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel