Commit eab5228
committed
BUG: fix cpow tests to match what npy_cpow does.
Annex G of the C99 standard does not define any special values for cpow,
allowing the implementation to be as simple as cpow(z,w) =
cexp(w*clog(z)). We have a large number of tests for our cpow function,
both in the test suite and in test_c99complex.c. (There are actually
more in test_c99complex.c, since I'm doing all combinations from
TestCpow::test_scalar in test_umath_complex.py.)
As of right now, these tests probably mean that we will never use a
system cpow implemenation. This is fine, since we handle a large number
of edge cases in a sane way and at least glibc does not.
With this commit all 48 of our complex functions pass test_c99complex.c.1 parent c8f13ee commit eab5228
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1458 | 1458 | | |
1459 | 1459 | | |
1460 | 1460 | | |
1461 | | - | |
| 1461 | + | |
1462 | 1462 | | |
1463 | 1463 | | |
1464 | 1464 | | |
| |||
1473 | 1473 | | |
1474 | 1474 | | |
1475 | 1475 | | |
1476 | | - | |
| 1476 | + | |
1477 | 1477 | | |
1478 | | - | |
1479 | | - | |
| 1478 | + | |
| 1479 | + | |
1480 | 1480 | | |
1481 | 1481 | | |
1482 | | - | |
| 1482 | + | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | 1485 | | |
| |||
0 commit comments