From 579c43317e0af8b2dcd80a854d88de74679cf07a Mon Sep 17 00:00:00 2001 From: tadf Date: Mon, 29 Jun 2009 16:20:32 +0000 Subject: * complex.c (nucomp_expt): do not use rb_fexpt. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- complex.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'complex.c') diff --git a/complex.c b/complex.c index 4b51e237b..b176dd36d 100644 --- a/complex.c +++ b/complex.c @@ -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); -- cgit