| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#t if obj is a number, a complex number, a real number,
a rational number or an integer, respectively. In Gauche, a set of
numbers is the same as a set of complex numbers, and a set of
rational numbers is the same as a set of integers.
(complex? 3+4i) => #t (complex? 3) => #t (real? 3) => #t (real? -2.5+0.0i) => #t (real? #e1e10) => #t (integer? 3+0i) => #t (integer? 3.0) => #t |
#t if obj is an exact number and an inexact number,
respectively.
(exact? 1) => #t (exact? 1.0) => #f (inexact? 1) => #f (inexact? 1.0) => #t (exact? (modulo 5 3)) => #t (inexact? (modulo 5 3.0)) => #f |
#t if a number z equals to zero.
(zero? 1) => #f (zero? 0) => #t (zero? 0.0) => #t (zero? 0.0+0.0i) => #t |
#t if a real number x is positive and negative,
respectively. It is an error to pass a non-real number.
#t if an integer n is odd and even,
respectively. It is an error to pass a non-integral number.
(odd? 3) => #t (even? 3) => #f (odd? 3.0) => #t |
#t iff n is an exact integer whose internal
representation is fixnum and bignum, respectively.
Portable Scheme programs don't need to care about the internal
representation of integer. These are for certain low-level
routines that does particular optimization.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |