Next: 6.4 I/O Facilities Up: 6 Predefined Functions and Previous: 6.2 String Manipulation

6.3 Mathematical Functions

This library is an interface to some functions of the standard C math library. Moreover, it registers a fallback for the binary operator ^ which, when applied to numbers x^y, returns x^y.

The library provides the following functions:

abs acos asin atan ceil cos floor log log10
max min  mod  sin  sqrt tan
Most of them are only interfaces to the homonymous functions in the C library, except that, for the trigonometric functions, all angles are expressed in degrees.

The function max returns the maximum value in a list of numeric arguments. Similarly, min computes the minimum. Both can be used with an unlimited number of arguments.

The function mod is equivalent to the % operator in C.

Next: 6.4 I/O Facilities Up: 6 Predefined Functions and Previous: 6.2 String Manipulation