asin

Calculates the arc sine of x, returning a value ranging from -π/2 to π/2.

Special Values
xasin(x)invalid?
±0.0±0.0no
>1.0NaNyes
<-1.0NaNyes
  1. real asin(real x)
    @safe pure nothrow @nogc
    real
    asin
    (
    real x
    )
  2. double asin(double x)
  3. float asin(float x)

Examples

import std.math.operations : isClose;
import std.math.traits : isIdentical, isNaN;
import std.math.constants : PI;

assert(isIdentical(asin(0.0), 0.0));
assert(asin(0.5).isClose(PI / 6));
assert(asin(PI).isNaN);

Meta