Skip to content

Commit

Permalink
native: Add float-decimal for CLISP
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Jun 13, 2024
1 parent 73f183f commit 2de2898
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion code/native/implementation.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(defclass client () ())

#+(or abcl ccl clasp cmucl ecl sbcl)
#+(or abcl ccl clasp clisp cmucl ecl sbcl)
(defmethod quaviver:float-decimal ((client client) value)
#+abcl
(multiple-value-bind (digits digits-length leading-point
Expand All @@ -18,6 +18,13 @@
(values (map 'vector #'digit-char-p digits)
exponent
sign))
#+clisp
(multiple-value-bind (digits k position sign)
(system::decode-float-decimal value t)
(declare (ignore k))
(values (map 'vector #'digit-char-p digits)
(- position (length digits))
(floor (float-sign value))))
#+(or clasp cmucl ecl sbcl)
(multiple-value-bind (position digits)
#+clasp (core::float-to-digits nil value nil nil)
Expand Down

0 comments on commit 2de2898

Please sign in to comment.