Mathematical Functions The following functions are supplied as an external function package called rxmathfn. Either a REXX program or a dynamically-loadable object may be used (see the section on function invocation). All the functions described below give results according to the current setting of NUMERIC DIGITS, but they use floating-point maths so a maximum of about 16 digits of accuracy may be obtained. The exception is the square root function, which can always give the required number of digits of accuracy (subject to machine resources). ACOS(x) the arc-cosine of x in radians (0<=acos(x)<=pi) ASIN(x) the arc-sine of x in radians (-pi/2<=asin(x)<=pi/2) ATAN(x) the arc-tangent of x in radians (-pi/2<=atan(x)<=pi/2) COS(x) the cosine of x radians EXP(x) the exponential of x (2.718281... to the power x) LN(x) the natural logarithm of x (x>0) SIN(x) the sine of x radians SQRT(x) the square root of x (x>=0) [arbitrary precision possible] TAN(x) the tangent of x radians (x <> pi/2) TOPOWER(x,y) x to the power y (like x**y except non-integer values of y are allowed). If y=0 then the result is 1. If x=0 and y>0 then the result is 0. Otherwise the result is exp(y*ln(x)).