tests/float/cmath_fun.py: Fix truncation of small real part of complex.
This commit is contained in:
parent
b9a133e5ad
commit
a111ca25ea
@ -50,6 +50,6 @@ for f_name, f, test_vals in functions:
|
|||||||
else:
|
else:
|
||||||
# some test (eg cmath.sqrt(-0.5)) disagree with CPython with tiny real part
|
# some test (eg cmath.sqrt(-0.5)) disagree with CPython with tiny real part
|
||||||
real = ret.real
|
real = ret.real
|
||||||
if abs(real) < 1e15:
|
if abs(real) < 1e-6:
|
||||||
real = 0.
|
real = 0.
|
||||||
print("complex(%.5g, %.5g)" % (real, ret.imag))
|
print("complex(%.5g, %.5g)" % (real, ret.imag))
|
||||||
|
Loading…
Reference in New Issue
Block a user