1# test bignum operation with float/complex
2
3i = 1 << 65
4
5# convert bignum to float on rhs
6print("%.5g" % (2.0 * i))
7
8# negative bignum as float
9print("%.5g" % float(-i))
10
11# this should convert to float
12print("%.5g" % (i / 5))
13
14# these should delegate to float
15print("%.5g" % (i * 1.2))
16print("%.5g" % (i / 1.2))
17
18# this should delegate to complex
19print("%.5g" % (i * 1.2j).imag)
20
21# negative power should produce float
22print("%.5g" % (i ** -1))
23print("%.5g" % ((2 + i - i) ** -3))
24
25try:
26    i / 0
27except ZeroDivisionError:
28    print("ZeroDivisionError")
29