diff options
Diffstat (limited to 'tests/float/complex1.py')
-rw-r--r-- | tests/float/complex1.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/float/complex1.py b/tests/float/complex1.py index 239527109..ebe4b0f37 100644 --- a/tests/float/complex1.py +++ b/tests/float/complex1.py @@ -43,6 +43,11 @@ print("%.5g" % abs(1j + 2)) # float on lhs should delegate to complex print(1.2 + 3j) +# check printing of inf/nan +print(float('nan') * 1j) +print(float('inf') * (1 + 1j)) +print(float('-inf') * (1 + 1j)) + # convert bignum to complex on rhs ans = 1j + (1 << 70); print("%.5g %.5g" % (ans.real, ans.imag)) |