Functions
In addition to the functions defined by the operators, the following functions are available:
Functions that take more than one parameter
sum()
- returns a sum of the passed parameterscount()
- returns the number of passed parametersmin()
- returns the minimum of the passed parametersmax()
- returns the maximum of the passed parametersmedian()
- returns the median of the passed parametersstddev()
- returns the standard deviation of the passed parametersaverage()
- returns the average of the passed parametersrandom()
- returns a random integer. Can take 0, 1, or 2 parameters. The first parameter (if given) is the lower bound of the random integer. The second parameter (if given) is the upper bound of the random integer.nthroot()
- returns the nth root of a number. For example,nthroot(27,3)
returns the cube root of 27, or 3.
Functions that take a single parameter:
sqrt()
- returns the square root of the passed parameterlog()
- returns the base 10 log of the passed parameterln()
- returns the base e log of the passed parameterlog2()
- returns the base 2 log of the passed parameterexp()
- returns e raised to the power of the passed parameterceil()
- returns the passed parameter rounded upfloor()
- returns the passed parameter rounded downThe trigonometric functions:
sin()
,cos()
,tan()
- Their inverses (
asin
,acos
,atan
) - Their reciprocals (
csc
,sec
,cotan
) - The reciprocals of the inverses (
acsc
,asec
,acotan
) - The hyperbolic variations of all the above functions (
sinh
,cosh
,tanh
,asinh
,acosh
,atanh
,csch
,sech
,cotanh
,acsch
,asech
,acotanh
) - The versine functions (
versin
,vercosin
,coversin
,covercosin
,haversin
,havercosin
,hacoversin
,hacovercosin
,exsec
,excsc
,crd
)
dtor()
- converts the passed parameter from degrees to radiansrtod()
- converts the passed parameter from radians to degrees
Functions that take no parameters (“constant functions”):
phi()
- returns the value of ϕ (the Golden Ratio). Also recognized asϕ()
pi()
- returns the value of π. Also recognized asπ()
pi_2()
- returns the value of π/2pi_4()
- returns the value of π/4tau()
- returns the value of τ. Also recognized asτ()
sqrt2()
- returns the value of the square root of 2e()
- returns the value of elog2e()
- returns the value of the log base 2 of elog10e()
- returns the value of the log base 10 of eln2()
- returns the value of the log base e of 2ln10()
- returns the value of the log base e of 10