6.6.2.12 Scientific Functions

The following procedures accept any kind of number as arguments, including complex numbers.

Scheme Procedure: sqrt z

Return the square root of z. Of the two possible roots (positive and negative), the one with a positive real part is returned, or if that’s zero then a positive imaginary part. Thus,

(sqrt 9.0)       ⇒ 3.0
(sqrt -9.0)      ⇒ 0.0+3.0i
(sqrt 1.0+1.0i)  ⇒ 1.09868411346781+0.455089860562227i
(sqrt -1.0-1.0i) ⇒ 0.455089860562227-1.09868411346781i
Scheme Procedure: expt z1 z2

Return z1 raised to the power of z2.

Scheme Procedure: sin z

Return the sine of z.

Scheme Procedure: cos z

Return the cosine of z.

Scheme Procedure: tan z

Return the tangent of z.

Scheme Procedure: asin z

Return the arcsine of z.

Scheme Procedure: acos z

Return the arccosine of z.

Scheme Procedure: atan z
Scheme Procedure: atan y x

Return the arctangent of z, or of y/x.

Scheme Procedure: exp z

Return e to the power of z, where e is the base of natural logarithms (2.71828…).

Scheme Procedure: log z

Return the natural logarithm of z.

Scheme Procedure: log10 z

Return the base 10 logarithm of z.

Scheme Procedure: sinh z

Return the hyperbolic sine of z.

Scheme Procedure: cosh z

Return the hyperbolic cosine of z.

Scheme Procedure: tanh z

Return the hyperbolic tangent of z.

Scheme Procedure: asinh z

Return the hyperbolic arcsine of z.

Scheme Procedure: acosh z

Return the hyperbolic arccosine of z.

Scheme Procedure: atanh z

Return the hyperbolic arctangent of z.