2011

Table Of Contents
CAL supports the standard numeric functions in the following table.
Numeric functions
DescriptionFunction
Sine of the anglesin(angle)
Cosine of the anglecos(angle)
Tangent of the angletang(angle)
Arcsine of the number; the number must be between -1 and 1asin(real)
Arccosine of the number; the number must be between -1 and 1acos(real)
Arctangent of the numberatan(real)
Natural log of the numberln(real)
Base-10 log of the numberlog(real)
Natural exponent of the numberexp(real)
Base-10 exponent of the numberexp10(real)
Square of the numbersqr(real)
Square root of the number; the number must be nonnegativesqrt(real)
Absolute value of the numberabs(real)
Number rounded to the nearest integerround(real)
Integer portion of the numbertrunc(real)
Angles in radians converted to degrees; for example, r2d(pi) converts
the pi radians to 180 degrees
r2d(angle)
Angles in degrees converted to radians; for example, d2r(180) con-
verts 180 degrees to radians and returns the value of pi
d2r(angle)
The constant pipi
Use Standard Numeric Functions | 159