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


12.10.20 Sign of real numbers

Unsafe Operation: $sign-fixnum fx

Return a fixnum representing the sign of fx: +1 for positive, -1 for negative, 0 for zero.

Unsafe Operation: $sign-bignum bn

Return a fixnum representing the sign of bn: +1 for positive, -1 for negative. Bignums do not represent zero.

Unsafe Operation: $sign-flonum fl

Return a flonum representing the sign of fx: +1.0 for positive, including +0.0 and +inf.0; -1.0 for negative, including -0.0 and -inf.0; +nan.0 for not–a–number.

Unsafe Operation: $sign-ratnum rt

Return a fixnum representing the sign of the numerator of rt: +1 for positive, -1 for negative. Ratnums do not represent zero.