projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf9f4d8
)
Minor rewrite of cmath_log to work around a Sun compiler bug. See issue
author
Mark Dickinson
<dickinsm@gmail.com>
Sat, 5 Jul 2008 15:25:48 +0000
(15:25 +0000)
committer
Mark Dickinson
<dickinsm@gmail.com>
Sat, 5 Jul 2008 15:25:48 +0000
(15:25 +0000)
#3168.
Modules/cmathmodule.c
patch
|
blob
|
history
diff --git
a/Modules/cmathmodule.c
b/Modules/cmathmodule.c
index 109f2cc9f9f9ff973e692764f51441bb0aaff38e..42af08cf47b377ab826208a960b4aa0f3e8ee228 100644
(file)
--- a/
Modules/cmathmodule.c
+++ b/
Modules/cmathmodule.c
@@
-839,8
+839,10
@@
cmath_log(PyObject *self, PyObject *args)
errno = 0;
PyFPE_START_PROTECT("complex function", return 0)
x = c_log(x);
- if (PyTuple_GET_SIZE(args) == 2)
- x = c_quot(x, c_log(y));
+ if (PyTuple_GET_SIZE(args) == 2) {
+ y = c_log(y);
+ x = c_quot(x, y);
+ }
PyFPE_END_PROTECT(x)
if (errno != 0)
return math_error();