HP 3000 Manuals

cos [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

cos 

Computes a cosine value for a given angle.

Syntax 

     #include <math.h>
     double cos (double x);

Parameters 

x             A real number giving the angle measured in radians.

Return Value 

n             The cosine of the angle.

0             A complete loss of significance.  A TLOSS error message is
              printed on the standard error output.  The external
              variable errno is set to ERANGE.

Description 

The cos function returns the cosine of its argument, x, measured in
radians.

This function loses accuracy when its argument is far from zero.  For
less extreme arguments causing partial loss of significance, a PLOSS
error is generated but no message is printed and errno is set to ERANGE.

Error handling can be changed by a user-written matherr function.

See Also 

sin(), tan(), matherr(), ANSI C 4.5.2.5, POSIX.1 8.1



MPE/iX 5.0 Documentation