New submission from mattip: complex(1., 0.) ** complex(float('inf'), 0.) raises a ZeroDivisionError. In general, complex_power() needs to handle more corner cases. Barring a clear standard for pow() in C99, the documentation for pow 3 in glibc http://www.kernel.org/doc/man-pages/online/pages/man3/pow.3.html seems solid for a start, however it only describes behaviour for float/double values.
Where would be an appropriate place to add tests? I propose adding a test-case file similar to cmath_testcases.txt (attached) and a test runner similar to test_cmath.py ---------- components: Interpreter Core files: rcomplex_testcases2.txt messages: 170856 nosy: mark.dickinson, mattip priority: normal severity: normal status: open title: pow() for complex numbers is rough around the edges type: behavior Added file: http://bugs.python.org/file27238/rcomplex_testcases2.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15996> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com