End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Math.frexp
Math.frexp(x) → [fraction, exponent]
math.c
View on GitHub ↗
static VALUE
math_frexp(VALUE unused_obj, VALUE x)
{
double d;
int exp;
d = frexp(Get_Double(x), &exp);
return rb_assoc_new(DBL2NUM(d), INT2NUM(exp));
}