* Added real-valued?, integer-valued? and rational-valued?
This commit is contained in:
parent
c55cad8502
commit
69d692417f
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -5,7 +5,8 @@
|
|||
integer? exact? inexact? eof-object? bwp-object? immediate?
|
||||
boolean? char? vector? bytevector? string? procedure? null? pair?
|
||||
symbol? code? not weak-pair? eq? eqv? equal? boolean=?
|
||||
symbol=? finite? infinite? nan?)
|
||||
symbol=? finite? infinite? nan? real-valued?
|
||||
rational-valued? integer-valued?)
|
||||
|
||||
(import
|
||||
(except (ikarus) fixnum? flonum? bignum? ratnum? number? complex? real?
|
||||
|
@ -13,7 +14,8 @@
|
|||
immediate? boolean? char? vector? bytevector? string? procedure?
|
||||
null? pair? weak-pair? symbol? code? not eq? eqv? equal?
|
||||
port? input-port? output-port? boolean=? symbol=?
|
||||
finite? infinite? nan?)
|
||||
finite? infinite? nan? real-valued? rational-valued?
|
||||
integer-valued?)
|
||||
(ikarus system $fx)
|
||||
(ikarus system $flonums)
|
||||
(ikarus system $pairs)
|
||||
|
@ -72,6 +74,9 @@
|
|||
(define real?
|
||||
(lambda (x) (number? x)))
|
||||
|
||||
(define real-valued?
|
||||
(lambda (x) (number? x)))
|
||||
|
||||
(define rational?
|
||||
(lambda (x)
|
||||
(cond
|
||||
|
@ -79,7 +84,10 @@
|
|||
[(sys:bignum? x) #t]
|
||||
[(sys:ratnum? x) #t]
|
||||
[(sys:flonum? x) ($flonum-rational? x)]
|
||||
[else (error 'rational? "~s is not a number" x)])))
|
||||
[else #f])))
|
||||
|
||||
(define rational-valued?
|
||||
(lambda (x) (rational? x)))
|
||||
|
||||
(define integer?
|
||||
(lambda (x)
|
||||
|
@ -90,6 +98,9 @@
|
|||
[(sys:flonum? x) ($flonum-integer? x)]
|
||||
[else #f])))
|
||||
|
||||
(define integer-valued?
|
||||
(lambda (x) (integer? x)))
|
||||
|
||||
(define exact?
|
||||
(lambda (x)
|
||||
(cond
|
||||
|
|
|
@ -510,6 +510,9 @@
|
|||
[ratnum? i]
|
||||
[integer? i r]
|
||||
[real? i r]
|
||||
[integer-valued? i]
|
||||
[real-valued? i]
|
||||
[rational-valued? i]
|
||||
[flinteger? i]
|
||||
[flfinite? i]
|
||||
[flinfinite? i]
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
[inexact? C ba se]
|
||||
[infinite? C ba]
|
||||
[integer->char C ba se]
|
||||
[integer-valued? S ba]
|
||||
[integer-valued? C ba]
|
||||
[integer? C ba se]
|
||||
[lcm C ba se]
|
||||
[length C ba se]
|
||||
|
@ -190,11 +190,11 @@
|
|||
[pair? C ba se]
|
||||
[positive? C ba se]
|
||||
[procedure? C ba se]
|
||||
[rational-valued? S ba]
|
||||
[rational-valued? C ba]
|
||||
[rational? C ba se]
|
||||
[rationalize C ba se]
|
||||
[real-part D ba se]
|
||||
[real-valued? S ba]
|
||||
[real-valued? C ba]
|
||||
[real? C ba se]
|
||||
[reverse C ba se]
|
||||
[round C ba se]
|
||||
|
|
Loading…
Reference in New Issue