summaryrefslogtreecommitdiffstats
path: root/complex.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-29 16:20:32 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-29 16:20:32 +0000
commit579c43317e0af8b2dcd80a854d88de74679cf07a (patch)
treed5416e375ebcd97d9d93899933c846b58dc0ef39 /complex.c
parent72835997446a545e9cb8b726e9a60e39902926a3 (diff)
downloadruby-579c43317e0af8b2dcd80a854d88de74679cf07a.tar.gz
ruby-579c43317e0af8b2dcd80a854d88de74679cf07a.tar.xz
ruby-579c43317e0af8b2dcd80a854d88de74679cf07a.zip
* 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
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c11
1 files changed, 2 insertions, 9 deletions
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);