* Added bytevector clause for equal?

* exported real? (number? really until complex nums are added).
This commit is contained in:
Abdulaziz Ghuloum 2007-09-11 00:13:10 -04:00
parent 3ecf53f9fd
commit 79b6e46cab
5 changed files with 17 additions and 5 deletions

Binary file not shown.

View File

@ -10,17 +10,18 @@
inexact->exact exact $flonum-rational? $flonum-integer? $flzero?
$flnegative? flpositive? flabs fixnum->flonum
flsin flcos fltan flasin flacos flatan fleven? flodd?
flfloor flceiling flnumerator fldenominator flexp
flfloor flceiling flnumerator fldenominator flexp fllog
flinteger? flonum-bytes flnan? flfinite? flinfinite?)
(import
(ikarus system $bytevectors)
(ikarus system $fx)
(only (ikarus system $flonums) $fl>=)
(ikarus system $bignums)
(except (ikarus system $flonums) $flonum-signed-biased-exponent
$flonum-rational? $flonum-integer?)
(except (ikarus) inexact->exact exact flpositive? flabs fixnum->flonum
flsin flcos fltan flasin flacos flatan fleven? flodd?
flfloor flceiling flnumerator fldenominator flexp
flfloor flceiling flnumerator fldenominator flexp fllog
flinteger? flonum-parts flonum-bytes flnan? flfinite? flinfinite?))
(define (flonum-bytes f)
@ -278,6 +279,13 @@
(foreign-call "ikrt_fl_exp" x ($make-flonum))
(error 'flexp "~s is not a flonum" x)))
(define (fllog x)
(if (flonum? x)
(if ($fl>= x 0.0)
(foreign-call "ikrt_fl_log" x)
(error 'fllog "argument ~s should not be negative" x))
(error 'fllog "~s is not a flonum" x)))
)

View File

@ -190,6 +190,8 @@
(and ($fx= n ($string-length y))
(string-loop x y 0 n))))]
[(number? x) (and (number? y) (= x y))]
[(sys:bytevector? x)
(and (sys:bytevector? y) (bytevector=? x y))]
[else #f]))))
(define port?

View File

@ -481,6 +481,7 @@
[flnumerator i rfl]
[fldenominator i rfl]
[flexp i rfl]
[fllog i rfl]
[fixnum->string i]
[string->flonum i]
[- i r]
@ -507,6 +508,7 @@
[bignum? i]
[ratnum? i]
[integer? i r]
[real? i r]
[flinteger? i]
[flfinite? i]
[flinfinite? i]

View File

@ -195,7 +195,7 @@
[rationalize S ba se]
[real-part D ba se]
[real-valued? S ba]
[real? S ba se]
[real? C ba se]
[reverse C ba se]
[round C ba se]
[sin C ba se]
@ -326,7 +326,7 @@
[flfloor C fl]
[flinfinite? C fl]
[flinteger? C fl]
[fllog S fl]
[fllog C fl]
[flmax C fl]
[flmin C fl]
[flmod D fl]
@ -339,7 +339,7 @@
[flpositive? C fl]
[flround C fl]
[flsin C fl]
[flsqrt S fl]
[flsqrt C fl]
[fltan C fl]
[fltruncate S fl]
[flzero? C fl]