acos

Calculates the arc cosine of x, returning a value ranging from 0 to π. Exceptions:

InvalidOperationExceptionx is signaling NaN or |x| > 1.0
InexactExceptionthe result is inexact
More...
@IEEECompliant("acos", 43)
D
acos
(
D
)
(
auto const ref D x
)

Detailed Description

Special values

xacos(x)
NaNNaN
-1.0π
+1.0+0.0
< -1.0NaN
> +1.0NaN

Examples

decimal32 x = 0;
assert(acos(x) == decimal32.PI_2);

Meta