Guardian C Library Calls Reference Manual
cos
3-20 128833—Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
cos
The cos function computes the cosine of its argument.
expr
is an expression of type double, specifying an angle in radians.
Return Value
is the cosine of expr, expressed as a double value.
Example
This example prints “The cosine is 0.540302.”
#include <mathh>
#include <stdioh>
int main(void)
{
double r, x;
x = -1.0;
r = cos(x);
printf ("The cosine is %f.", r);
}
#include <mathh>
double cos(double expr);