Skip to content

Commit

Permalink
liebler: Fix return for infinities and NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Jun 24, 2024
1 parent 167f52c commit 9415785
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/liebler/implementation.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
(defmacro %liebler (client result-type significand exponent sign bits significand-size expt10 round-to-odd)
`(if (or (not (numberp ,exponent))
(zerop ,significand))
(values ,significand ,exponent ,sign)
(quaviver:integer-float ,client ,result-type 2
,significand ,exponent ,sign)
(let ((k (quaviver/math:floor-log2-expt10 ,exponent))
(shift (- ,bits (integer-length ,significand))))
(setf ,significand (,round-to-odd (,expt10 (- ,exponent))
Expand Down

0 comments on commit 9415785

Please sign in to comment.