/*
* call-seq:
* Math.sqrt(numeric) => float
*
* Returns the non-negative square root of <i>numeric</i>. Raises
* <code>ArgError</code> if <i>numeric</i> is less than zero.
*/
static VALUE
math_sqrt(obj, x)
VALUE obj, x;
{
double d;
Need_Float(x);
errno = 0;
d = sqrt(RFLOAT(x)->value);
if (errno) {
rb_sys_fail("sqrt");
}
return rb_float_new(d);
}