Skip to content

Commit

Permalink
compare: add rounding more arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Jul 2, 2024
1 parent d163364 commit 763217b
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions code/compare/float-integer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,30 @@
:coverage coverage))
rest))

(defun float-integer/s.d/f (&rest rest &key (coverage 1) &allow-other-keys)
(defun float-integer/s.d/f (&rest rest
&key (coverage 1) (rounding :away-from-zero)
&allow-other-keys)
(apply #'test
(list (make-instance 'float-integer
:client1 (make-instance 'quaviver/schubfach:client)
:client2 (make-instance 'quaviver/dragonbox:nearest-client)
:client1 (make-instance 'quaviver/schubfach:client
:rounding rounding)
:client2 (make-instance 'quaviver/dragonbox:nearest-client
:binary-decimal-rounding rounding)
:base 10))
(list (make-instance 'bit-interval
:end #xff
:coverage coverage))
rest))

(defun float-integer/s.d/d (&rest rest &key (coverage (expt 2 -32)) &allow-other-keys)
(defun float-integer/s.d/d (&rest rest
&key (coverage (expt 2 -32)) (rounding :away-from-zero)
&allow-other-keys)
(apply #'test
(list (make-instance 'float-integer
:client1 (make-instance 'quaviver/schubfach:client)
:client2 (make-instance 'quaviver/dragonbox:nearest-client)
:client1 (make-instance 'quaviver/schubfach:client
:rounding rounding)
:client2 (make-instance 'quaviver/dragonbox:nearest-client
:binary-decimal-rounding rounding)
:base 10))
(list (make-instance 'bit-interval
:float-type 'double-float
Expand Down

0 comments on commit 763217b

Please sign in to comment.