+ return abs($out1 - $out2) < 0.0001 && abs($out1a - $out2a) < 0.0001;
+}
+
+use Carp;
+sub decide(&)
+{
+ my ($sub) = @_;
+ my $good = 0;
+ my $bad = 0;
+ for(;;)
+ {
+ for(1..200)
+ {
+ my $r = $sub->();
+ ++$good if $r;
+ ++$bad if not $r;
+ }
+ #print STDERR "decide: $good vs $bad\n";
+ return 1 if $good > $bad + 150;
+ return 0 if $bad > $good + 150;
+ warn "No clear decision, continuing to test ($good : $bad)";
+ }