diff options
Diffstat (limited to 'pkg/language/doc/mathfcns.hlp')
-rw-r--r-- | pkg/language/doc/mathfcns.hlp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkg/language/doc/mathfcns.hlp b/pkg/language/doc/mathfcns.hlp new file mode 100644 index 00000000..50e797f3 --- /dev/null +++ b/pkg/language/doc/mathfcns.hlp @@ -0,0 +1,56 @@ +.help mathfcns Feb86 language +.ih +NAME +mathfcns -- math functions available in the CL +.ih +SYNOPSIS + +.nf +Function Return value Description + +sin(x) real sine +cos(x) real cosine +tan(x) real tangent +atan2(x,y) real arc-tangent +exp(x) real e**x +log(x) real natural logarithm +log10(x) real common logarithm +frac(x) real fractional part +abs(x) type of argument absolute value +min(a,b,...) type of min. arg minimum of a list of values +max(a,b,...) type of max. arg maximum of a list of values +real(x) real convert to real +int(x) integer integer part +.fi +.ih +DESCRIPTION +A number of mathematical functions are available under the CL. In general +they return real values and may be used wherever a real expression is +valid. The input arguments may be integer or real and may be mixed in +cases where the function has more than one argument. +Exceptions: + +.nf + abs(x) returns real or integer depending on its argument + int(x) returns an integer + min,max return a copy of the min/max operand, no type change +.fi + +Note that the intrinsic functions \fIint\fR and \fIreal\fR may be called +to decode string valued arguments. +.ih +EXAMPLES +.nf +y = sin (x) + = 180 / 3.1415927 * atan2 (x, y) +i = int (max (4.3, x, y, 2)) + = 1. - (sin(.5)**2 + cos(.5)**2) +.fi +.ih +BUGS +An invalid argument list to a math function (e.g. log(-1)) will terminate +a script. +.ih +SEE ALSO +strings +.endhelp |