asin(p1)
public
Computes the arc sine of x. Returns -PI/2..PI/2.
Domain: [-1, -1]
Codomain: [-PI/2, PI/2]
Math.asin(1) == Math::PI/2
Show source
static VALUE
math_asin(VALUE unused_obj, VALUE x)
{
double d;
d = Get_Double(x);
/* check for domain error */
if (d < -1.0 || 1.0 < d) domain_error("asin");
return DBL2NUM(asin(d));
}