IRAF help page for package language, program mathfcns

from NOAO mathfcns -- math functions available in the CLSYNOPSISDESCRIPTIONEXAMPLESBUGSSEE ALSO

mathfcns -- math functions available in the CL


SYNOPSIS

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

DESCRIPTION

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:

    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

Note that the intrinsic functions int and real may be called to decode string valued arguments.


EXAMPLES

y = sin (x)
  = 180 / 3.1415927 * atan2 (x, y)
i = int (max (4.3, x, y, 2))
  = 1. - (sin(.5)**2 + cos(.5)**2)

BUGS

BUGS An invalid argument list to a math function (e.g. log(-1)) will terminate a script.


SEE ALSO

strings,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu