From 7fb9edf43653d35d389a4604d7402c85540511a2 Mon Sep 17 00:00:00 2001 From: stijn Date: Wed, 1 Apr 2020 11:02:11 +0200 Subject: [PATCH] tests/float: Fix cmath_fun_special for MICROPY_FLOAT_IMPL_FLOAT. When the unix and windows ports use MICROPY_FLOAT_IMPL_FLOAT instead of MICROPY_FLOAT_IMPL_DOUBLE, the test output has for example complex(-0.15052, 0.34109) instead of the expected complex(-0.15051, 0.34109). Use one decimal place less for the output printing to fix this. --- tests/float/cmath_fun_special.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/float/cmath_fun_special.py b/tests/float/cmath_fun_special.py index 33b94d04db..e4c3c17745 100644 --- a/tests/float/cmath_fun_special.py +++ b/tests/float/cmath_fun_special.py @@ -29,4 +29,4 @@ for f_name, f, test_vals in functions: print(f_name) for val in test_vals: ret = f(val) - print("complex(%.5g, %.5g)" % (ret.real, ret.imag)) + print("complex(%.4g, %.4g)" % (ret.real, ret.imag))