*(p1)
public
Returns a new float which is the product of float and other.
Show source
/*
* call-seq:
* float * other => float
*
* Returns a new float which is the product of <code>float</code>
* and <code>other</code>.
*/
static VALUE
flo_mul(x, y)
VALUE x, y;
{
switch (TYPE(y)) {
case T_FIXNUM:
return rb_float_new(RFLOAT(x)->value * (double)FIX2LONG(y));
case T_BIGNUM:
return rb_float_new(RFLOAT(x)->value * rb_big2dbl(y));
case T_FLOAT:
return rb_float_new(RFLOAT(x)->value * RFLOAT(y)->value);
default:
return rb_num_coerce_bin(x, y);
}
}