/* @(#)z_acos.c 1.0 98/08/13 */ /* FUNCTION <>, <>---arc cosine INDEX acos INDEX acosf SYNOPSIS #include double acos(double <[x]>); float acosf(float <[x]>); DESCRIPTION <> computes the inverse cosine (arc cosine) of the input value. Arguments to <> must be in the range @minus{}1 to 1. <> is identical to <>, except that it performs its calculations on <>. RETURNS @ifnottex <> and <> return values in radians, in the range of 0 to pi . @end ifnottex @tex <> and <> return values in radians, in the range of <<0>> t o $\pi$. @end tex If <[x]> is not between @minus{}1 and 1, the returned value is NaN (not a number) the global variable <> is set to <>, and a <> message is sent as standard error output. QUICKREF ansi posix rentrant acos y,y,m acosf n,n,m MATHREF acos, [-1,1], acos(arg),,, acos, NAN, arg,DOMAIN,EDOM MATHREF acosf, [-1,1], acosf(arg),,, acosf, NAN, argf,DOMAIN,EDOM */ /***************************************************************** * Arccosine * * Input: * x - floating point value * * Output: * arccosine of x * * Description: * This routine returns the arccosine of x. * *****************************************************************/ #include "fdlibm.h" #include "zmath.h" #ifndef _DOUBLE_IS_32BITS double acos (double x) { return (asine (x, 1)); } #endif /* _DOUBLE_IS_32BITS */