From 19852424615e5056bec4cf3d3147808a45ac9b30 Mon Sep 17 00:00:00 2001 From: Markus Holzer <markus.holzer@fau.de> Date: Mon, 20 Dec 2021 22:21:33 +0100 Subject: [PATCH] Fix squre root round off --- pystencils_tests/test_types.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pystencils_tests/test_types.py b/pystencils_tests/test_types.py index 8fc260f42..b6a7cd81c 100644 --- a/pystencils_tests/test_types.py +++ b/pystencils_tests/test_types.py @@ -101,8 +101,9 @@ def test_sqrt_of_integer(): kernel(f=arr_single) code = ps.get_code_str(kernel.ast) - - assert "1.7320508075688772f" in code + # ps.show_code(kernel.ast) + # 1.7320508075688772935 --> it is actually correct to round to ...773. This was wrong before !282 + assert "1.7320508075688773f" in code assert 1.7 < arr_single[0] < 1.8 -- GitLab