File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 2828print ((1j / 2j ).real )
2929print (1j / (1 + 2j ))
3030ans = 0j ** 0 ; print ("%.5g %.5g" % (ans .real , ans .imag ))
31+ ans = 0j ** 1 ; print ("%.5g %.5g" % (ans .real , ans .imag ))
3132ans = 0j ** 0j ; print ("%.5g %.5g" % (ans .real , ans .imag ))
3233ans = 1j ** 2.5 ; print ("%.5g %.5g" % (ans .real , ans .imag ))
3334ans = 1j ** 2.5j ; print ("%.5g %.5g" % (ans .real , ans .imag ))
9495 print ("ZeroDivisionError" )
9596
9697# zero division via power
98+ try :
99+ 0j ** - 1
100+ except ZeroDivisionError :
101+ print ("ZeroDivisionError" )
97102try :
98103 0j ** 1j
99104except ZeroDivisionError :
Original file line number Diff line number Diff line change 7575except ZeroDivisionError :
7676 print ("ZeroDivisionError" )
7777
78+ try :
79+ 0.0 ** - 1
80+ except ZeroDivisionError :
81+ print ("ZeroDivisionError" )
82+
7883# unsupported unary ops
7984
8085try :
Original file line number Diff line number Diff line change 22 1 / 0
33except ZeroDivisionError :
44 print ("ZeroDivisionError" )
5+
6+ try :
7+ 0 ** - 1
8+ except ZeroDivisionError :
9+ print ("ZeroDivisionError" )
You can’t perform that action at this time.
0 commit comments