summaryrefslogtreecommitdiff
path: root/lib/sbin
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-02-02 14:36:50 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-02-02 14:36:50 +0000
commitda3279f964923b9b6a2eb7849695a0adefb95a61 (patch)
tree0c7180b6daa94e65507a9a0c81189f9fb1139140 /lib/sbin
parent61e0fb2f3cc68898b1fcf2b14ca21f59e03587cb (diff)
Don't treat NaN as an error if the testsuite also contains a NaN.
Added check for Infimum. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2012 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin')
-rw-r--r--lib/sbin/Runtest.pl51
1 files changed, 31 insertions, 20 deletions
diff --git a/lib/sbin/Runtest.pl b/lib/sbin/Runtest.pl
index c091b457..429d057c 100644
--- a/lib/sbin/Runtest.pl
+++ b/lib/sbin/Runtest.pl
@@ -362,32 +362,43 @@ sub runtest {
while ($oline = <INORIG>) {
$nline = <INNEW>;
# Now lets see if they differ.
- if ($nline =~ /nan/i)
- {
- print "****CAUGHT NAN in $newfile****\n";
- $nblow ++;
- $nrealblow ++;
- }
- elsif (!($nline eq $oline)) {
+ if (!($nline eq $oline)) {
+# Check against nans
+ if ($nline =~ /nan/i)
+ {
+ print "****CAUGHT NAN in $newfile****\n";
+ $nblow ++;
+ $nrealblow ++;
+ }
+# Check against inf
+ elsif ($nline =~ /inf/i)
+ {
+ print "****CAUGHT INF in $newfile****\n";
+ $nblow ++;
+ $nrealblow ++;
+ }
+ else
+ {
# This is the new comparison (subtract last two numbers)
- ($t1,$v1) = split(' ', $nline);
- ($t2,$v2) = split(' ', $oline);
+ ($t1,$v1) = split(' ', $nline);
+ ($t2,$v2) = split(' ', $oline);
# Make sure that floating point numbers have 'e' if exponential.
- $v1 =~ s/[dD]/e/;
- $v2 =~ s/[dD]/e/;
+ $v1 =~ s/[dD]/e/;
+ $v2 =~ s/[dD]/e/;
- $vdiff = abs($v1 - $v2);
- if ($vdiff > 0) {
+ $vdiff = abs($v1 - $v2);
+ if ($vdiff > 0) {
- # They diff. But do they differ strongly?
- $nblow ++;
+ # They diff. But do they differ strongly?
+ $nblow ++;
- $exp = sprintf("%e",$vdiff);
- $exp =~ s/^.*e-(\d+)/$1/;
- unless ($exp >= $tolerance) {
- $nrealblow++;
- }
+ $exp = sprintf("%e",$vdiff);
+ $exp =~ s/^.*e-(\d+)/$1/;
+ unless ($exp >= $tolerance) {
+ $nrealblow++;
+ }
+ }
}
}
}