Next Previous Up Contents
Next: Randoms
Up: Functions
Previous: Lists

10.7.14 Maths

Standard mathematical and trigonometric functions. Trigonometric functions work with angles in radians.

sin( theta )
Sine of an angle.

cos( theta )
Cosine of an angle.

tan( theta )
Tangent of an angle.

asin( x )
Arc sine of an angle. The result is in the range of -pi/2 through pi/2.

acos( x )
Arc cosine of an angle. The result is in the range of 0.0 through pi.

atan( x )
Arc tangent of an angle. The result is in the range of -pi/2 through pi/2.

ln( x )
Natural logarithm.

exp( x )
Euler's number e raised to a power.

log10( x )
Logarithm to base 10.

exp10( x )
Power of 10. This convenience function is identical to pow(10,x).

sqrt( x )
Square root. The result is correctly rounded and positive.

square( x )
Raise to the power 2.

hypot( xs, ... )
Returns the square root of the sum of squares of its arguments. In the 2-argument case, doing it like this may avoid intermediate overflow or underflow.

atan2( y, x )
Converts rectangular coordinates (x,y) to polar (r,theta). This method computes the phase theta by computing an arc tangent of y/x in the range of -pi to pi.

pow( a, b )
Exponentiation. The result is the value of the first argument raised to the power of the second argument.

sinh( x )
Hyperbolic sine.

cosh( x )
Hyperbolic cosine.

tanh( x )
Hyperbolic tangent.

asinh( x )
Inverse hyperbolic sine.

acosh( x )
Inverse hyperbolic cosine.

atanh( x )
Inverse hyperbolic tangent.

E
Euler's number e, the base of natural logarithms.

PI
Pi, the ratio of the circumference of a circle to its diameter.

Infinity
Positive infinite floating point value.

NaN
Not-a-Number floating point value. Use with care; arithmetic and logical operations behave in strange ways near NaN (for instance, NaN!=NaN). For most purposes this is equivalent to the blank value.


Next Previous Up Contents
Next: Randoms
Up: Functions
Previous: Lists

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk