From 9039afdead7cef1b674a3e78080fa367a319ba38 Mon Sep 17 00:00:00 2001 From: Vincent Snijders Date: Wed, 18 Feb 2009 21:16:11 +0000 Subject: [PATCH] * fixed overflow when calculating frequencies + added lpi git-svn-id: trunk@12749 - --- .gitattributes | 1 + tests/bench/shootout/src/knucleotide.lpi | 50 ++++++++++++++++++++++++ tests/bench/shootout/src/knucleotide.pp | 2 +- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 tests/bench/shootout/src/knucleotide.lpi diff --git a/.gitattributes b/.gitattributes index fbfe83693b..5183754e89 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6426,6 +6426,7 @@ tests/bench/shootout/src/chameneos.pp svneol=native#text/plain tests/bench/shootout/src/fannkuch.pp svneol=native#text/plain tests/bench/shootout/src/fasta.pp svneol=native#text/plain tests/bench/shootout/src/hello.pp svneol=native#text/plain +tests/bench/shootout/src/knucleotide.lpi svneol=native#text/plain tests/bench/shootout/src/knucleotide.pp svneol=native#text/plain tests/bench/shootout/src/mandelbrot.pp svneol=native#text/plain tests/bench/shootout/src/message.pp svneol=native#text/plain diff --git a/tests/bench/shootout/src/knucleotide.lpi b/tests/bench/shootout/src/knucleotide.lpi new file mode 100644 index 0000000000..c885edcb0c --- /dev/null +++ b/tests/bench/shootout/src/knucleotide.lpi @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/bench/shootout/src/knucleotide.pp b/tests/bench/shootout/src/knucleotide.pp index 767c01c811..18967c6fb9 100644 --- a/tests/bench/shootout/src/knucleotide.pp +++ b/tests/bench/shootout/src/knucleotide.pp @@ -326,7 +326,7 @@ begin sortArray(s, size); for i := 0 to size - 1 do - writeln(s[i].sequence,' ', (100 * s[i].num / total):3:3); + writeln(s[i].sequence,' ', (100 * (s[i].num / total)):3:3); writeln; ht.Free;