Ignore:
Timestamp:
Feb 17, 2010 1:33:52 PM (10 years ago)
Author:
utke
Message:

compiler message: ISO C++ does not support the `%le' printf format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/examples/additional_examples/speelpenning/speelpenning.cpp

    r42 r88  
    7676    double t11 = myclock();
    7777
    78     fprintf(stdout,"%le =? %le  function values should be the same \n",yout,yp);
     78    fprintf(stdout,"%E =? %E  function values should be the same \n",yout,yp);
    7979
    8080    /*--------------------------------------------------------------------------*/
     
    124124    }
    125125
    126     fprintf(stdout,"%le = maximum relative errors in gradient (fw+rv)\n",err);
     126    fprintf(stdout,"%E = maximum relative errors in gradient (fw+rv)\n",err);
    127127
    128128    /*--------------------------------------------------------------------------*/
     
    136136        err =  maxabs(err,g[i]/z[i] - 1.0);
    137137
    138     fprintf(stdout,"%le = gradient error should be exactly zero \n",err);
     138    fprintf(stdout,"%E = gradient error should be exactly zero \n",err);
    139139
    140140    /*--------------------------------------------------------------------------*/
     
    153153        err = maxabs(err,xp[0]*h[i]/g[i]-1.0);
    154154
    155     fprintf(stdout,"%le = maximum relative error in Hessian column \n",err);
     155    fprintf(stdout,"%E = maximum relative error in Hessian column \n",err);
    156156
    157157    /*--------------------------------------------------------------------------*/
     
    162162
    163163    fprintf(stdout,
    164             "%le = %le (1,n) and (n,1) entry should be the same\n",h1n,h[0]);
     164            "%E = %E (1,n) and (n,1) entry should be the same\n",h1n,h[0]);
    165165
    166166    /*--------------------------------------------------------------------------*/
     
    169169        double rtu = 1.0/(t01-t00);
    170170        fprintf(stdout,"\n\n times for ");
    171         fprintf(stdout,"\n unitime          : \t%le  seconds",(t01-t00)/itu);
    172         fprintf(stdout,"\n tracing          : \t%le",(t11-t10)*rtu*itu);
    173         fprintf(stdout,"   units \t%le seconds",(t11-t10));
     171        fprintf(stdout,"\n unitime          : \t%E  seconds",(t01-t00)/itu);
     172        fprintf(stdout,"\n tracing          : \t%E",(t11-t10)*rtu*itu);
     173        fprintf(stdout,"   units \t%E seconds",(t11-t10));
    174174        fprintf(stdout,
    175175                "\n----------------------------------------------------------");
    176         fprintf(stdout,"\n forward (no keep): \t%le",(t61-t60)*rtu);
    177         fprintf(stdout,"   units \t%le seconds",(t61-t60)/itu);
    178         fprintf(stdout,"\n forward + keep   : \t%le",(t21-t20)*rtu);
    179         fprintf(stdout,"   units \t%le seconds",(t21-t20)/itu);
    180         fprintf(stdout,"\n reverse          : \t%le",(t31-t30)*rtu);
    181         fprintf(stdout,"   units \t%le seconds",(t31-t30)/itu);
     176        fprintf(stdout,"\n forward (no keep): \t%E",(t61-t60)*rtu);
     177        fprintf(stdout,"   units \t%E seconds",(t61-t60)/itu);
     178        fprintf(stdout,"\n forward + keep   : \t%E",(t21-t20)*rtu);
     179        fprintf(stdout,"   units \t%E seconds",(t21-t20)/itu);
     180        fprintf(stdout,"\n reverse          : \t%E",(t31-t30)*rtu);
     181        fprintf(stdout,"   units \t%E seconds",(t31-t30)/itu);
    182182        fprintf(stdout,
    183183                "\n----------------------------------------------------------");
    184         fprintf(stdout,"\n gradient         : \t%le",(t41-t40)*rtu);
    185         fprintf(stdout,"   units \t%le seconds",(t41-t40)/itu);
    186         fprintf(stdout,"\n hess*vec         : \t%le",(t51-t50)*rtu);
    187         fprintf(stdout,"   units \t%le seconds\n",(t51-t50)/itu);
     184        fprintf(stdout,"\n gradient         : \t%E",(t41-t40)*rtu);
     185        fprintf(stdout,"   units \t%E seconds",(t41-t40)/itu);
     186        fprintf(stdout,"\n hess*vec         : \t%E",(t51-t50)*rtu);
     187        fprintf(stdout,"   units \t%E seconds\n",(t51-t50)/itu);
    188188    } else
    189189        fprintf(stdout,"\n-> zero timing due to small problem dimension \n");
Note: See TracChangeset for help on using the changeset viewer.