fixed incorrect error message for non-real arguments to negative?,
positive?, and abs.
This commit is contained in:
parent
e3ce873118
commit
97dfb20a53
|
@ -1542,7 +1542,7 @@
|
||||||
(if (< n 0)
|
(if (< n 0)
|
||||||
($make-ratnum (- n) ($ratnum-d x))
|
($make-ratnum (- n) ($ratnum-d x))
|
||||||
x))]
|
x))]
|
||||||
[else (die 'abs "not a number" x)]))
|
[else (die 'abs "not a real number" x)]))
|
||||||
|
|
||||||
(define flmin
|
(define flmin
|
||||||
(case-lambda
|
(case-lambda
|
||||||
|
@ -2433,7 +2433,7 @@
|
||||||
(values (inexact q) (inexact r)))]
|
(values (inexact q) (inexact r)))]
|
||||||
[else
|
[else
|
||||||
(die 'quotient+remainder "not an integer" y)]))]
|
(die 'quotient+remainder "not an integer" y)]))]
|
||||||
[else (die 'quotient+remainder "not a number" y)])]
|
[else (die 'quotient+remainder "not an integer" y)])]
|
||||||
[(bignum? x)
|
[(bignum? x)
|
||||||
(cond
|
(cond
|
||||||
[(fixnum? y)
|
[(fixnum? y)
|
||||||
|
@ -2450,7 +2450,7 @@
|
||||||
(values (inexact q) (inexact r)))]
|
(values (inexact q) (inexact r)))]
|
||||||
[else
|
[else
|
||||||
(die 'quotient+remainder "not an integer" y)]))]
|
(die 'quotient+remainder "not an integer" y)]))]
|
||||||
[else (die 'quotient+remainder "not a number" y)])]
|
[else (die 'quotient+remainder "not an integer" y)])]
|
||||||
[(flonum? x)
|
[(flonum? x)
|
||||||
(let ([v ($flonum->exact x)])
|
(let ([v ($flonum->exact x)])
|
||||||
(cond
|
(cond
|
||||||
|
@ -2458,7 +2458,7 @@
|
||||||
(let-values ([(q r) (quotient+remainder v y)])
|
(let-values ([(q r) (quotient+remainder v y)])
|
||||||
(values (inexact q) (inexact r)))]
|
(values (inexact q) (inexact r)))]
|
||||||
[else (die 'quotient+remainder "not an integer" x)]))]
|
[else (die 'quotient+remainder "not an integer" x)]))]
|
||||||
[else (die 'quotient+remainder "not a number" x)])))
|
[else (die 'quotient+remainder "not an integer" x)])))
|
||||||
|
|
||||||
(define positive?
|
(define positive?
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
|
@ -2467,7 +2467,7 @@
|
||||||
[(flonum? x) ($fl> x 0.0)]
|
[(flonum? x) ($fl> x 0.0)]
|
||||||
[(bignum? x) (positive-bignum? x)]
|
[(bignum? x) (positive-bignum? x)]
|
||||||
[(ratnum? x) (positive? ($ratnum-n x))]
|
[(ratnum? x) (positive? ($ratnum-n x))]
|
||||||
[else (die 'positive? "not a number" x)])))
|
[else (die 'positive? "not a real number" x)])))
|
||||||
|
|
||||||
(define negative?
|
(define negative?
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
|
@ -2476,7 +2476,7 @@
|
||||||
[(flonum? x) ($fl< x 0.0)]
|
[(flonum? x) ($fl< x 0.0)]
|
||||||
[(bignum? x) (not (positive-bignum? x))]
|
[(bignum? x) (not (positive-bignum? x))]
|
||||||
[(ratnum? x) (negative? ($ratnum-n x))]
|
[(ratnum? x) (negative? ($ratnum-n x))]
|
||||||
[else (die 'negative? "not a number" x)])))
|
[else (die 'negative? "not a real number" x)])))
|
||||||
|
|
||||||
(define sinh
|
(define sinh
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1837
|
1838
|
||||||
|
|
Loading…
Reference in New Issue