cospi

Returns cosine of xπ.

@IEEECompliant("cosPi", 42)
D
cospi
(
D
)
(
auto const ref D x
)

Throws

InvalidOperationExceptionx is signaling NaN or ±∞
UnderflowExceptionresult is too small to be represented
InexactExceptionthe result is inexact

Special values

xcospi(x)
NaNNaN
±∞NaN
±0.0+1.0
1/6+√3/2
1/4+√2/2
1/3+0.5
1/2+0.0
2/3-0.5
3/4-√2/2
5/6-√3/2
1.0-1.0

Meta