Next: Bitwise Operations, Previous: Scientific, Up: Numbers
Many of Guile's numeric procedures which accept any kind of numbers as arguments, including complex numbers, are implemented as Scheme procedures that use the following real number-based primitives. These primitives signal an error if they are called with complex arguments.
Return x raised to the power of y. This procedure does not accept complex arguments.
Return the arc tangent of the two arguments x and y. This is similar to calculating the arc tangent of x / y, except that the signs of both arguments are used to determine the quadrant of the result. This procedure does not accept complex arguments.
Return e to the power of x, where e is the base of natural logarithms (2.71828...).
C functions for the above are provided by the standard mathematics
library. Naturally these expect and return double
arguments
(see Mathematics).
Scheme Procedure | C Function
| |
$abs | fabs
| |
$sqrt | sqrt
| |
$sin | sin
| |
$cos | cos
| |
$tan | tan
| |
$asin | asin
| |
$acos | acos
| |
$atan | atan
| |
$atan2 | atan2
| |
$exp | exp
| |
$expt | pow
| |
$log | log
| |
$sinh | sinh
| |
$cosh | cosh
| |
$tanh | tanh
| |
$asinh | asinh
| |
$acosh | acosh
| |
$atanh | atanh
|
asinh
, acosh
and atanh
are C99 standard but might
not be available on older systems. Guile provides the following
equivalents (on all systems).