diff options
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -887,7 +887,7 @@ nucomp_expt(VALUE self, VALUE other) if (r) break; - x = f_complex_new2(CLASS_OF(self), + x = nucomp_s_new_internal(CLASS_OF(self), f_sub(f_mul(dat->real, dat->real), f_mul(dat->imag, dat->imag)), f_mul(f_mul(TWO, dat->real), dat->imag)); @@ -896,7 +896,10 @@ nucomp_expt(VALUE self, VALUE other) z = f_mul(z, x); n--; } - return z; + { + get_dat1(z); + return f_complex_new2(CLASS_OF(self), dat->real, dat->imag); + } } return f_expt(f_reciprocal(self), f_negate(other)); } |