diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runner.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/runner.py b/tests/runner.py index 2ff97c2c..ba501372 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -4828,25 +4828,27 @@ else: def test_corrections(self): Settings.CORRECT_SIGNS = Settings.CORRECT_OVERFLOWS = Settings.CORRECT_ROUNDINGS = 1 - src = ''' + src = r''' #include<stdio.h> #include<math.h> int main() { - int N = 4500; - int M = 4500; + int N = 4100; + int M = 4100; unsigned int f = 0; + unsigned short s = 0; for (int t = 0; t < M; t++) { for (int i = 0; i < N; i++) { f += i / ((t % 5)+1); if (f > 1000) f /= (t % 3)+1; if (i % 4 == 0) f += sqrtf(i) * (i % 8 == 0 ? 1 : -1); + s += (short(f)*short(f)) % 256; } } - printf("final: %d.\\n", f); + printf("final: %d:%d.\n", f, s); return 1; } ''' - self.do_benchmark(src, [], 'final: 451.') + self.do_benchmark(src, [], 'final: 826:14324.') def test_fasta(self): src = open(path_from_root('tests', 'fasta.cpp'), 'r').read() |