[New-bugs-announce] [issue15996] pow() for complex numbers is rough around the edges

mattip report at bugs.python.org
Fri Sep 21 00:00:28 CEST 2012

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
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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list