Browse Source

ported from g77 to gfortran

master
Dan Ballard 10 years ago
parent
commit
06496457bb
  1. 2
      autoTest.pl
  2. 2
      primes.f

2
autoTest.pl

@ -87,7 +87,7 @@ $data{'cpp'}{'cflags0'} = "-lm -O3 -o " . $data{'cpp'}{'prog'};
$data{'for'}{'name'} = "Fortran";
$data{'for'}{'src'} = "primes.f";
$data{'for'}{'compiler0'} = "g77";
$data{'for'}{'compiler0'} = "gfortran";
$data{'for'}{'prog'} = "primesfor";
$data{'for'}{'cflags0'} = "-O3 -o $data{'for'}{'prog'}";

2
primes.f

@ -18,7 +18,7 @@ c haplo@mindstab.net
test = sqrt(float(cnt));
isPrime=1;
do test = 3, test, +2
if (mod(cnt, test) == 0) then
if (mod(cnt, int(test)) == 0) then
isPrime=0;
exit;
endif

Loading…
Cancel
Save