diff --git a/bignum.c b/bignum.c index e53b2bd2c1..8f9f2ce737 100644 --- a/bignum.c +++ b/bignum.c @@ -6211,7 +6211,7 @@ rb_big_pow(VALUE x, VALUE y) if (RB_FLOAT_TYPE_P(y)) { d = RFLOAT_VALUE(y); if ((BIGNUM_NEGATIVE_P(x) && !BIGZEROP(x))) { - return rb_dbl_complex_polar(pow(-rb_big2dbl(x), d), d); + return rb_dbl_complex_polar_pi(pow(-rb_big2dbl(x), d), d); } } else if (RB_BIGNUM_TYPE_P(y)) { diff --git a/complex.c b/complex.c index a6e2de60ed..7a52a4259e 100644 --- a/complex.c +++ b/complex.c @@ -546,7 +546,7 @@ f_complex_polar(VALUE klass, VALUE x, VALUE y) /* returns a Complex or Float of ang*PI-rotated abs */ VALUE -rb_dbl_complex_polar(double abs, double ang) +rb_dbl_complex_polar_pi(double abs, double ang) { double fi; const double fr = modf(ang, &fi); diff --git a/internal.h b/internal.h index e5f578dde0..07d5dee5ac 100644 --- a/internal.h +++ b/internal.h @@ -1299,7 +1299,7 @@ VALUE rb_complex_plus(VALUE, VALUE); VALUE rb_complex_mul(VALUE, VALUE); VALUE rb_complex_abs(VALUE x); VALUE rb_complex_sqrt(VALUE x); -VALUE rb_dbl_complex_polar(double abs, double ang); +VALUE rb_dbl_complex_polar_pi(double abs, double ang); VALUE rb_complex_pow(VALUE self, VALUE other); /* cont.c */ diff --git a/numeric.c b/numeric.c index d698fcedea..e708a7e511 100644 --- a/numeric.c +++ b/numeric.c @@ -1276,7 +1276,7 @@ rb_float_pow(VALUE x, VALUE y) dx = RFLOAT_VALUE(x); dy = RFLOAT_VALUE(y); if (dx < 0 && dy != round(dy)) - return rb_dbl_complex_polar(pow(-dx, dy), dy); + return rb_dbl_complex_polar_pi(pow(-dx, dy), dy); } else { return rb_num_coerce_bin(x, y, idPow); @@ -4056,7 +4056,7 @@ fix_pow(VALUE x, VALUE y) if (a == 1) return DBL2NUM(1.0); { if (a < 0 && dy != round(dy)) - return rb_dbl_complex_polar(pow(-(double)a, dy), dy); + return rb_dbl_complex_polar_pi(pow(-(double)a, dy), dy); return DBL2NUM(pow((double)a, dy)); } }