Next: rnrs arithmetic bitwise, Previous: rnrs arithmetic fixnums, Up: R6RS Standard Libraries [Contents][Index]
The (rnrs arithmetic flonums (6))
library provides procedures for
performing arithmetic operations on inexact representations of real
numbers, which R6RS refers to as flonums.
Unless otherwise specified, all of the procedures below take flonums as
arguments, and will raise an &assertion
condition if passed a
non-flonum argument.
Returns #t
if obj is a flonum, #f
otherwise.
Returns the flonum that is numerically closest to the real number x.
These procedures return #t
if their flonum arguments are
(respectively): equal, monotonically increasing, monotonically
decreasing, monotonically nondecreasing, or monotonically nonincreasing;
#f
otherwise.
These numerical predicates return #t
if fl is,
respectively, an integer, zero, greater than zero, less than zero, odd,
even, #f
otherwise. In the case of flodd?
and
fleven?
, fl must be an integer-valued flonum.
These numerical predicates return #t
if fl is,
respectively, not infinite, infinite, or a NaN
value.
These procedures return the maximum or minimum of their arguments.
These procedures return the sum or product of their arguments.
These procedures return, respectively, the difference or quotient of their arguments when called with two arguments; when called with a single argument, they return the additive or multiplicative inverse of fl.
Returns the absolute value of fl.
These procedures implement number-theoretic division on flonums; See (rnrs base), for a description for their semantics.
These procedures return the numerator or denominator of fl as a flonum.
These procedures are identical to the floor
, ceiling
,
truncate
, and round
procedures provided by Guile’s core
library. See Arithmetic, for documentation.
These procedures, which compute the usual transcendental functions, are the flonum variants of the procedures provided by the R6RS base library (see (rnrs base)).
Returns the square root of fl. If fl is -0.0
,
-0.0 is returned; for other negative values, a NaN
value
is returned.
Returns the value of fl1 raised to the power of fl2.
The following condition types are provided to allow Scheme
implementations that do not support infinities or NaN
values
to indicate that a computation resulted in such a value. Guile supports
both of these, so these conditions will never be raised by Guile’s
standard libraries implementation.
A condition type indicating that a computation resulted in an infinite value on a Scheme implementation incapable of representing infinities.
A condition type indicating that a computation resulted in a NaN
value on a Scheme implementation incapable of representing NaN
s.
Returns the flonum that is numerically closest to the fixnum fx.
Next: rnrs arithmetic bitwise, Previous: rnrs arithmetic fixnums, Up: R6RS Standard Libraries [Contents][Index]