Skip to content

Commit

Permalink
quaviver: Use bit decode for CCL to capture NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Jul 3, 2024
1 parent 2dac1bc commit bc36472
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions code/float-integer-2.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,17 @@
(- exponent ,exponent-bias)
sign)))))))))

#-(or abcl allegro clasp cmucl ecl lispworks sbcl)
#-(or abcl allegro ccl clasp cmucl ecl lispworks sbcl)
(defmethod float-integer (client (base (eql 2)) value)
(declare (ignore client))
;; CCL has good behavior so use integer-decode-float. Fallback to
;; integer-decode-float for unknown CL implementations.
(integer-decode-float value))

#+(or abcl allegro clasp cmucl ecl lispworks sbcl)
#+(or abcl allegro ccl clasp cmucl ecl lispworks sbcl)
(defmethod float-integer (client (base (eql 2)) (value single-float))
(declare (ignore client))
(%integer-decode-float single-float value))

#+(or abcl allegro clasp cmucl ecl lispworks sbcl)
#+(or abcl allegro ccl clasp cmucl ecl lispworks sbcl)
(defmethod float-integer (client (base (eql 2)) (value double-float))
(declare (ignore client))
(%integer-decode-float double-float value))
Expand Down

0 comments on commit bc36472

Please sign in to comment.