aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 2 insertions, 2 deletions
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));
}
}