summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/complex.c b/complex.c
index 365fb7ad17..50d53afcde 100644
--- a/complex.c
+++ b/complex.c
@@ -592,8 +592,8 @@ f_complex_polar(VALUE klass, VALUE x, VALUE y)
y = DBL2NUM(imag);
}
else {
+ y = f_mul(x, DBL2NUM(sin(arg)));
x = f_mul(x, DBL2NUM(cos(arg)));
- y = f_mul(y, DBL2NUM(sin(arg)));
if (canonicalization && f_zero_p(y)) return x;
}
return nucomp_s_new_internal(klass, x, y);