summaryrefslogtreecommitdiffstatshomepage
path: root/tools/tinytest-codegen.py
diff options
context:
space:
mode:
authorDan Ellis <dan.ellis@gmail.com>2022-07-12 09:48:38 -0400
committerDamien George <damien@micropython.org>2022-07-26 22:23:47 +1000
commitf9cbe6bc47dd4f5b8e85178caecd6f0de22b4c34 (patch)
tree7e4e3ad1a60aecb364528e609fddb3721fdb5af8 /tools/tinytest-codegen.py
parentb22abcdbbedb0f7583b19031fd65e19b3883671d (diff)
downloadmicropython-f9cbe6bc47dd4f5b8e85178caecd6f0de22b4c34.tar.gz
micropython-f9cbe6bc47dd4f5b8e85178caecd6f0de22b4c34.zip
py/formatfloat: Format all whole-number floats exactly.
Formerly, py/formatfloat would print whole numbers inaccurately with nonzero digits beyond the decimal place. This resulted from its strategy of successive scaling of the argument by 0.1 which cannot be exactly represented in floating point. The change in this commit avoids scaling until the value is smaller than 1, so all whole numbers print with zero fractional part. Fixes issue #4212. Signed-off-by: Dan Ellis dan.ellis@gmail.com
Diffstat (limited to 'tools/tinytest-codegen.py')
-rwxr-xr-xtools/tinytest-codegen.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/tinytest-codegen.py b/tools/tinytest-codegen.py
index f1169a34d4..feda75f283 100755
--- a/tools/tinytest-codegen.py
+++ b/tools/tinytest-codegen.py
@@ -79,6 +79,7 @@ exclude_tests = (
"float/float_divmod.py",
# requires double precision floating point to work
"float/float2int_doubleprec_intbig.py",
+ "float/float_format_ints_doubleprec.py",
"float/float_parse_doubleprec.py",
# inline asm FP tests (require Cortex-M4)
"inlineasm/asmfpaddsub.py",