diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-02 16:12:58 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-02 16:12:58 -0700 |
commit | c9823a494a96e2058f391a1778ad199f733c0423 (patch) | |
tree | f1bcbe4ab7e0d62112ee31d69c4579296dcbd0d6 /tests | |
parent | 2d819db53b19fea02c3fa5dd8100fcb5fa4d1b4f (diff) |
fix very large doubles; fixes #2392
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/test_floatvars.in | 9 | ||||
-rw-r--r-- | tests/core/test_floatvars.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/tests/core/test_floatvars.in b/tests/core/test_floatvars.in index b6c94c82..d59b6028 100644 --- a/tests/core/test_floatvars.in +++ b/tests/core/test_floatvars.in @@ -15,13 +15,8 @@ int main(int argc, char **argv) { printf("small: %.10f\n", argc * 0.000001); - /* - // Rounding behavior - float fs[6] = { -2.75, -2.50, -2.25, 2.25, 2.50, 2.75 }; - double ds[6] = { -2.75, -2.50, -2.25, 2.25, 2.50, 2.75 }; - for (int i = 0; i < 6; i++) - printf("*int(%.2f)=%d,%d*\n", fs[i], int(fs[i]), int(ds[i])); - */ + double d = 1.12345678901234567890123e21; + printf("double: %f\n", d); return 0; } diff --git a/tests/core/test_floatvars.out b/tests/core/test_floatvars.out index 57635092..128c04ae 100644 --- a/tests/core/test_floatvars.out +++ b/tests/core/test_floatvars.out @@ -1,3 +1,4 @@ *1,10,10.5,1,1.2340,0.00* 0.50, 3.30, 3.30, 3.30 small: 0.0000010000 +double: 1.1234567890123457e+21 diff --git a/tests/test_core.py b/tests/test_core.py index 505a051b..64cb1657 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -797,6 +797,8 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co self.do_run_from_file(src, output) def test_floatvars(self): + if self.run_name == 'slow2asm': return self.skip('FIXME in slow2asm') + test_path = path_from_root('tests', 'core', 'test_floatvars') src, output = (test_path + s for s in ('.in', '.out')) |