std.math.cos
- multiple declarations
- Function cos
- Function cos
Function cos
cosine, complex and imaginary
Prototypes
creal cos( creal z ) pure nothrow @nogc @safe; real cos( ireal y ) pure nothrow @nogc @safe;
Example
assert(cos(0.0+0.0i)==1.0); assert(cos(1.3L+0.0i)==cos(1.3L)); assert(cos(5.2Li)== cosh(5.2L));
Function cos
Returns cosine of x
. x
is in radians.
x
cos
(x
)Prototypes
real cos( real x ) pure nothrow @nogc @safe; double cos( double x ) pure nothrow @nogc @safe; float cos( float x ) pure nothrow @nogc @safe;
Bugs
Results are undefined if |x
| >= 2,64.
Authors
Walter Bright, Don Clugston, Conversion of CEPHES math library to D by Iain Buclaw