* Added bytevector clause for equal?
* exported real? (number? really until complex nums are added).
This commit is contained in:
parent
3ecf53f9fd
commit
79b6e46cab
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -10,17 +10,18 @@
|
||||||
inexact->exact exact $flonum-rational? $flonum-integer? $flzero?
|
inexact->exact exact $flonum-rational? $flonum-integer? $flzero?
|
||||||
$flnegative? flpositive? flabs fixnum->flonum
|
$flnegative? flpositive? flabs fixnum->flonum
|
||||||
flsin flcos fltan flasin flacos flatan fleven? flodd?
|
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?)
|
flinteger? flonum-bytes flnan? flfinite? flinfinite?)
|
||||||
(import
|
(import
|
||||||
(ikarus system $bytevectors)
|
(ikarus system $bytevectors)
|
||||||
(ikarus system $fx)
|
(ikarus system $fx)
|
||||||
|
(only (ikarus system $flonums) $fl>=)
|
||||||
(ikarus system $bignums)
|
(ikarus system $bignums)
|
||||||
(except (ikarus system $flonums) $flonum-signed-biased-exponent
|
(except (ikarus system $flonums) $flonum-signed-biased-exponent
|
||||||
$flonum-rational? $flonum-integer?)
|
$flonum-rational? $flonum-integer?)
|
||||||
(except (ikarus) inexact->exact exact flpositive? flabs fixnum->flonum
|
(except (ikarus) inexact->exact exact flpositive? flabs fixnum->flonum
|
||||||
flsin flcos fltan flasin flacos flatan fleven? flodd?
|
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?))
|
flinteger? flonum-parts flonum-bytes flnan? flfinite? flinfinite?))
|
||||||
|
|
||||||
(define (flonum-bytes f)
|
(define (flonum-bytes f)
|
||||||
|
@ -278,6 +279,13 @@
|
||||||
(foreign-call "ikrt_fl_exp" x ($make-flonum))
|
(foreign-call "ikrt_fl_exp" x ($make-flonum))
|
||||||
(error 'flexp "~s is not a flonum" x)))
|
(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)))
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -190,6 +190,8 @@
|
||||||
(and ($fx= n ($string-length y))
|
(and ($fx= n ($string-length y))
|
||||||
(string-loop x y 0 n))))]
|
(string-loop x y 0 n))))]
|
||||||
[(number? x) (and (number? y) (= x y))]
|
[(number? x) (and (number? y) (= x y))]
|
||||||
|
[(sys:bytevector? x)
|
||||||
|
(and (sys:bytevector? y) (bytevector=? x y))]
|
||||||
[else #f]))))
|
[else #f]))))
|
||||||
|
|
||||||
(define port?
|
(define port?
|
||||||
|
|
|
@ -481,6 +481,7 @@
|
||||||
[flnumerator i rfl]
|
[flnumerator i rfl]
|
||||||
[fldenominator i rfl]
|
[fldenominator i rfl]
|
||||||
[flexp i rfl]
|
[flexp i rfl]
|
||||||
|
[fllog i rfl]
|
||||||
[fixnum->string i]
|
[fixnum->string i]
|
||||||
[string->flonum i]
|
[string->flonum i]
|
||||||
[- i r]
|
[- i r]
|
||||||
|
@ -507,6 +508,7 @@
|
||||||
[bignum? i]
|
[bignum? i]
|
||||||
[ratnum? i]
|
[ratnum? i]
|
||||||
[integer? i r]
|
[integer? i r]
|
||||||
|
[real? i r]
|
||||||
[flinteger? i]
|
[flinteger? i]
|
||||||
[flfinite? i]
|
[flfinite? i]
|
||||||
[flinfinite? i]
|
[flinfinite? i]
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
[rationalize S ba se]
|
[rationalize S ba se]
|
||||||
[real-part D ba se]
|
[real-part D ba se]
|
||||||
[real-valued? S ba]
|
[real-valued? S ba]
|
||||||
[real? S ba se]
|
[real? C ba se]
|
||||||
[reverse C ba se]
|
[reverse C ba se]
|
||||||
[round C ba se]
|
[round C ba se]
|
||||||
[sin C ba se]
|
[sin C ba se]
|
||||||
|
@ -326,7 +326,7 @@
|
||||||
[flfloor C fl]
|
[flfloor C fl]
|
||||||
[flinfinite? C fl]
|
[flinfinite? C fl]
|
||||||
[flinteger? C fl]
|
[flinteger? C fl]
|
||||||
[fllog S fl]
|
[fllog C fl]
|
||||||
[flmax C fl]
|
[flmax C fl]
|
||||||
[flmin C fl]
|
[flmin C fl]
|
||||||
[flmod D fl]
|
[flmod D fl]
|
||||||
|
@ -339,7 +339,7 @@
|
||||||
[flpositive? C fl]
|
[flpositive? C fl]
|
||||||
[flround C fl]
|
[flround C fl]
|
||||||
[flsin C fl]
|
[flsin C fl]
|
||||||
[flsqrt S fl]
|
[flsqrt C fl]
|
||||||
[fltan C fl]
|
[fltan C fl]
|
||||||
[fltruncate S fl]
|
[fltruncate S fl]
|
||||||
[flzero? C fl]
|
[flzero? C fl]
|
||||||
|
|
Loading…
Reference in New Issue