Difference between revisions of "cpp/numeric/math/cos"
From cppreference.com
(+see c) |
m (link is_integral, otherwise "Integral arg" is confusing.) |
||
Line 21: | Line 21: | ||
===Parameters=== | ===Parameters=== | ||
{{par begin}} | {{par begin}} | ||
− | {{par | arg | | + | {{par | arg | value representing angle in radians, of a floating-point or [[cpp/types/is_integral|Integral type]]}} |
{{par end}} | {{par end}} | ||
Revision as of 08:32, 23 January 2014
Defined in header <cmath>
|
||
float cos( float arg ); |
||
double cos( double arg ); |
||
long double cos( long double arg ); |
||
double cos( Integral arg ); |
(since C++11) | |
Computes cosine of arg
.
Parameters
arg | - | value representing angle in radians, of a floating-point or Integral type |
Return value
Cosine of arg
in the range [-1.0 ; 1.0]
.
Domain error occurs if arg
is infinite. NAN is returned in that case.
See also
(C++11)(C++11) |
computes sine (sin(x)) (function) |
(C++11)(C++11) |
computes tangent (tan(x)) (function) |
(C++11)(C++11) |
computes arc cosine (arccos(x)) (function) |
computes cosine of a complex number (cos(z)) (function template) | |
applies the function std::cos to each element of valarray (function template) | |
C documentation for cos
|