fixed typo (wrong arg blamed in error)
This commit is contained in:
parent
234a57506f
commit
c640814917
|
@ -15,7 +15,7 @@
|
|||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(define (real->decimal-string n [digits 2])
|
||||
(unless (exact-nonnegative-integer? digits)
|
||||
(raise-type-error 'real->decimal-string "exact-nonnegative-integer" n))
|
||||
(raise-type-error 'real->decimal-string "exact-nonnegative-integer" digits))
|
||||
(let* ([e (expt 10 digits)]
|
||||
[num (round (abs (* e (inexact->exact n))))])
|
||||
(format "~a~a.~a"
|
||||
|
|
Loading…
Reference in New Issue
Block a user