cos(), cosf()

cosine function 

Function


SYNOPSIS

#include <math.h>

double cos(double x)

float cosf(float x)


DESCRIPTION

The cos() and cosf() functions compute the cosine of x (measured in radians). A large magnitude argument may yield a result with little or no significance.

The cosf() function is a single-precision version of cos().


PARAMETERS

x 

Is an angle in radians.


RETURN VALUES

The cos() function returns the cosine value.

If x is NaN, NaN is returned. If the return value would underflow, 0.0 is returned.


CONFORMANCE

cos(): ANSI/ISO 9899-1990

cosf(): PTC MKS Toolkit UNIX APIs extension


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

At high levels of compiler optimizations, the hardware handles the cos() function intrinsically. In such cases, mathematical exceptions do not cause the matherr() function to be called or the errno value to be set.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
acos(), asin(), atan(), atan2(), cosh(), math(), sin(), sinh(), tan(), tanh()


PTC MKS Toolkit 10.4 Documentation Build 39.