Next: iklib numerics bitwise, Previous: iklib numerics ratnums, Up: iklib numerics [Index]
The following bindings are exported by the library (vicare).
Add or subtract ‘1’ to num, which can be any number.
Return the square of num: num times num.
Return the cube of num: num times num times num.
Return the cubic root of num.
quotient+remainder returns two values: the quotient and the
remainder of the number–theoretic integer division between the
operands; quotient returns the quotient; remainder returns
the remainder. N1 and N2 must be exact or inexact integers
(fixnums, bignums, flonums); N2 must be non–zero.
The operations are defined as for quotient and remainder
from (rnrs r5rs (6)).
Note that considering:
(quotient+remainder X Y)
according to R6RS:
(define (sign n)
(cond ((negative? n) -1)
((positive? n) 1)
(else 0)))
(define (quotient n1 n2)
(* (sign n1) (sign n2) (div (abs n1) (abs n2))))
(define (remainder n1 n2)
(* (sign n1) (mod (abs n1) (abs n2))))
(define (modulo n1 n2)
(* (sign n2) (mod (* (sign n2) n1) (abs n2))))
so we have:
sign(quotient) = sign(X) * sign(Y) sign(remainder) = sign(X)
Return a number object representing the sign of X, which must be a real number. When X is a:
Return a fixnum representing the sign of X: +1 for
positive, -1 for negative, 0 for zero.
Return a flonum representing the sign of X: +1.0 for
positive, including +0.0 and +inf.0; -1 for
negative, including -0.0 and -inf.0; +nan.0 for
not–a–number.
Return a fixnum representing the sign of the numerator of rn:
+1 for positive, -1 for negative, 0 for zero.
Return the factorial of the non–negative integer I (which can be exact or inexact).
The num operand must be a real or complex number.
Hyperbolic functions.
Inverse hyperbolic functions.
Return the complex conjugate of the number object num.
Next: iklib numerics bitwise, Previous: iklib numerics ratnums, Up: iklib numerics [Index]