Next: , Previous: , Up: syslib flonums   [Index]


12.6.5 Predicates

Unsafe Operation: $flnan? fl

Return #t if the operand is a representation of not–a–number; otherwise return #f.

Unsafe Operation: $flinfinite? fl

Return #t if the operand is a representation of infinity: +inf.0 or -inf.0; otherwise return #f.

Unsafe Operation: $flzero? fl

Return true if the operand is zero. Notice that the return value will be true for both +0.0 or -0.0.

Unsafe Operation: $flzero?/positive fl
Unsafe Operation: $flzero?/negative fl

Return true if the operand is +0.0 or -0.0, respectively.

Unsafe Operation: $flpositive? fl

Return true if the operand is strictly positive. This predicate fails when applied to +0.0; to check for positivity including +0.0 we must use:

(or ($flzero?/positive fl) ($fl> fl +0.0))
Unsafe Operation: $flnegative? fl

Return true if the operand is strictly negative. This predicate fails when applied to -0.0; to check for negativity including -0.0 we must use:

(or ($flzero?/negative fl) ($fl< fl -0.0))
Unsafe Operation: $flnonpositive? fl

Return #t if the operand is non–positive. This predicate returns #f when applied to -0.0.

Unsafe Operation: $flnonnegative? fl

Return #t if the operand is non–negative. This predicate returns #f when applied to +0.0.

Unsafe Operation: $fleven? fl

Return true if the operand is even.

Unsafe Operation: $flodd? fl

Return true if the operand is odd.

Unsafe Operation: $flonum-integer? fl

Return true if the operand is integer.

Unsafe Operation: $flonum-rational? fl

Return true if the operand is rational. All the flonums are rational with the exception of infinities and not–a–number.


Next: , Previous: , Up: syslib flonums   [Index]