static public Method

Math.log(p1)

Math.log(numeric)     float

Returns the natural logarithm of numeric.

Source Code

/*
*  call-seq:
*     Math.log(numeric)    => float
*  
*  Returns the natural logarithm of <i>numeric</i>.
*/

static VALUE
math_log(obj, x)
   VALUE obj, x;
{
   double d;

   Need_Float(x);
   errno = 0;
   d = log(RFLOAT(x)->value);
   domain_check(d, "log");
   return rb_float_new(d);
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.