diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-29 16:20:32 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-29 16:20:32 +0000 |
commit | 59a9da6443db4baf5631dfad363e86673223e6d4 (patch) | |
tree | d5416e375ebcd97d9d93899933c846b58dc0ef39 /complex.c | |
parent | 8bacaf1f5c713a7a94b5a1540493c990259c14a5 (diff) | |
download | ruby-59a9da6443db4baf5631dfad363e86673223e6d4.tar.gz |
* complex.c (nucomp_expt): do not use rb_fexpt.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -825,14 +825,6 @@ nucomp_expt(VALUE self, VALUE other) other = dat->real; /* c14n */ } - { - get_dat1(self); - - if (k_exact_p(dat->imag) && f_zero_p(dat->imag) && f_real_p(other)) - return f_complex_new1(CLASS_OF(self), - rb_fexpt(dat->real, other)); /* c14n */ - } - if (k_complex_p(other)) { VALUE r, theta, nr, ntheta; @@ -883,7 +875,8 @@ nucomp_expt(VALUE self, VALUE other) r = f_abs(self); theta = f_arg(self); - return f_complex_polar(CLASS_OF(self), rb_fexpt(r, other), + + return f_complex_polar(CLASS_OF(self), f_expt(r, other), f_mul(theta, other)); } return rb_num_coerce_bin(self, other, id_expt); |