Skip to content

Commit

Permalink
Use float-triple
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Aug 6, 2024
1 parent f8cdad8 commit f3ebe96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/floating-point-printers.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
(coerce value 'single-float))))
(multiple-value-call func
client coerced-value
(quaviver:float-integer client 10 coerced-value))))))
(quaviver:float-triple client 10 coerced-value))))))

(defun round-away-from-zero (x n)
(multiple-value-bind (q r)
(truncate x n)
(if (>= (/ r n) 1/2)
(if (>= (* 2 r) n)
(1+ q)
q)))

Expand Down

0 comments on commit f3ebe96

Please sign in to comment.