summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/cmath_fun.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-09-04 17:02:36 +1000
committerDamien George <damien.p.george@gmail.com>2018-09-04 17:02:36 +1000
commita111ca25eaba71995aea588dc0662744864c65d1 (patch)
tree0050544a8cdccf4b60a10e7ea7deef0e2afffd63 /tests/float/cmath_fun.py
parentb9a133e5ad6038ca7008a611966897be732f1416 (diff)
downloadmicropython-a111ca25eaba71995aea588dc0662744864c65d1.tar.gz
micropython-a111ca25eaba71995aea588dc0662744864c65d1.zip
tests/float/cmath_fun.py: Fix truncation of small real part of complex.
Diffstat (limited to 'tests/float/cmath_fun.py')
-rw-r--r--tests/float/cmath_fun.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/float/cmath_fun.py b/tests/float/cmath_fun.py
index ae5921c304..d3df25e111 100644
--- a/tests/float/cmath_fun.py
+++ b/tests/float/cmath_fun.py
@@ -50,6 +50,6 @@ for f_name, f, test_vals in functions:
else:
# some test (eg cmath.sqrt(-0.5)) disagree with CPython with tiny real part
real = ret.real
- if abs(real) < 1e15:
+ if abs(real) < 1e-6:
real = 0.
print("complex(%.5g, %.5g)" % (real, ret.imag))