/[MITgcm]/MITgcm/verification/testreport
ViewVC logotype

Diff of /MITgcm/verification/testreport

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.56 by edhill, Thu Dec 9 16:41:41 2004 UTC revision 1.57 by jmc, Thu Dec 9 16:52:08 2004 UTC
# Line 520  createcodelet() Line 520  createcodelet()
520  int main( int argc, char** argv )  {  int main( int argc, char** argv )  {
521    int linnum,best,lncnt;    int linnum,best,lncnt;
522    double a,b,abave,relerr;    double a,b,abave,relerr;
523    best = -16;    best = -22;
524    lncnt = 0;    lncnt = 0;
525    while( 1 & (lncnt+=1) < 999 )  {    while( 1 & (lncnt+=1) < 999 )  {
526      scanf("%d", &linnum);      scanf("%d", &linnum);
# Line 529  int main( int argc, char** argv )  { Line 529  int main( int argc, char** argv )  {
529      abave = 0.5*(fabs(a)+fabs(b));      abave = 0.5*(fabs(a)+fabs(b));
530      if (abave > 0.0) {      if (abave > 0.0) {
531        relerr=fabs(a-b)/abave;        relerr=fabs(a-b)/abave;
532        if (relerr > 0.0) {        if (relerr > 0.0) { linnum = (int)log10(relerr); }
533          linnum = (int)log10(relerr);        else { linnum = -16 ; }
534          best = (best > linnum) ? best : linnum;        best = (best > linnum) ? best : linnum;
       }  
     }  
     else {  
       if (best == -16)  best = -22;  
535      }      }
536    }    }
537    if (lncnt == 999) best=-29;    if (lncnt == 999) best=-29;

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

  ViewVC Help
Powered by ViewVC 1.1.22