Changeset 88


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

Location:
trunk/ADOL-C
Files:
13 edited

Legend:

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

    r42 r88  
    191191        for (j=0; j<n; j++)
    192192            sum += (*pt++)*B[j];
    193         fprintf(stdout,"%le ",sum.value());
     193        fprintf(stdout,"%E ",sum.value());
    194194    }
    195195    fprintf(stdout,"\n\n times for ");
    196     fprintf(stdout,"\n tracing          : \t%le",(t01-t00)*rtu);
    197     fprintf(stdout," units \t%le    seconds",(t01-t00));
    198     fprintf(stdout,"\n forward (no keep): \t%le",(t41-t40)*rtu/itu);
    199     fprintf(stdout," units \t%le    seconds",(t41-t40)/itu);
    200     fprintf(stdout,"\n forward + keep   : \t%le",(t21-t20)*rtu/itu);
    201     fprintf(stdout," units \t%le    seconds",(t21-t20)/itu);
    202     fprintf(stdout,"\n reverse          : \t%le",(t31-t30)*rtu/itu);
    203     fprintf(stdout," units \t%le    seconds\n",(t31-t30)/itu);
     196    fprintf(stdout,"\n tracing          : \t%E",(t01-t00)*rtu);
     197    fprintf(stdout," units \t%E    seconds",(t01-t00));
     198    fprintf(stdout,"\n forward (no keep): \t%E",(t41-t40)*rtu/itu);
     199    fprintf(stdout," units \t%E    seconds",(t41-t40)/itu);
     200    fprintf(stdout,"\n forward + keep   : \t%E",(t21-t20)*rtu/itu);
     201    fprintf(stdout," units \t%E    seconds",(t21-t20)/itu);
     202    fprintf(stdout,"\n reverse          : \t%E",(t31-t30)*rtu/itu);
     203    fprintf(stdout," units \t%E    seconds\n",(t31-t30)/itu);
    204204
    205205    return 1;
  • trunk/ADOL-C/examples/additional_examples/detexam/detexam.cpp

    r42 r88  
    210210        for (j=0; j<n; j++)
    211211            sum += (*pt++)*B[j];
    212         fprintf(stdout,"%le ",sum.value());
     212        fprintf(stdout,"%E ",sum.value());
    213213    }
    214214    fprintf(stdout,"\n\n times for ");
    215     fprintf(stdout,"\n tracing          : \t%le",(t01-t00)*rtu);
    216     fprintf(stdout," units \t%le    seconds",(t01-t00));
    217     fprintf(stdout,"\n forward (no keep): \t%le",(t41-t40)*rtu/itu);
    218     fprintf(stdout," units \t%le    seconds",(t41-t40)/itu);
    219     fprintf(stdout,"\n forward + keep   : \t%le",(t21-t20)*rtu/itu);
    220     fprintf(stdout," units \t%le    seconds",(t21-t20)/itu);
    221     fprintf(stdout,"\n reverse          : \t%le",(t31-t30)*rtu/itu);
    222     fprintf(stdout," units \t%le    seconds\n",(t31-t30)/itu);
     215    fprintf(stdout,"\n tracing          : \t%E",(t01-t00)*rtu);
     216    fprintf(stdout," units \t%E    seconds",(t01-t00));
     217    fprintf(stdout,"\n forward (no keep): \t%E",(t41-t40)*rtu/itu);
     218    fprintf(stdout," units \t%E    seconds",(t41-t40)/itu);
     219    fprintf(stdout,"\n forward + keep   : \t%E",(t21-t20)*rtu/itu);
     220    fprintf(stdout," units \t%E    seconds",(t21-t20)/itu);
     221    fprintf(stdout,"\n reverse          : \t%E",(t31-t30)*rtu/itu);
     222    fprintf(stdout," units \t%E    seconds\n",(t31-t30)/itu);
    223223
    224224    return 1;
  • trunk/ADOL-C/examples/additional_examples/helm/helm-auto-exam.cpp

    r42 r88  
    8383    he >>= result;
    8484    trace_off();
    85     fprintf(stdout, "%14.6le -- energy\n",result);
     85    fprintf(stdout, "%14.6E -- energy\n",result);
    8686
    8787    /*--------------------------------------------------------------------------*/
     
    9090    /*--------------------------------------------------------------------------*/
    9191    for (l=0; l<n; l++)                                            /* results */
    92         fprintf(stdout,"%3d: %14.6le,  \n",l,grad[l]);
    93     fprintf(stdout,"%14.6le -- energy\n",result);
     92        fprintf(stdout,"%3d: %14.6E,  \n",l,grad[l]);
     93    fprintf(stdout,"%14.6E -- energy\n",result);
    9494
    9595    delete [] x;
  • trunk/ADOL-C/examples/additional_examples/helm/helm-diff-exam.cpp

    r42 r88  
    8383    /*--------------------------------------------------------------------------*/
    8484    result2 = energy(n,x,bv);                                    /* basepoint */
    85     fprintf(stdout,"%14.6le -- energy\n",result2);
     85    fprintf(stdout,"%14.6E -- energy\n",result2);
    8686
    8787    /*--------------------------------------------------------------------------*/
     
    9191        x[l]    = x[l]-delta;
    9292        q       = (result1-result2)/delta;
    93         fprintf(stdout,"%3d: %14.6le,  \n",l,q);
     93        fprintf(stdout,"%3d: %14.6E,  \n",l,q);
    9494    }
    95     fprintf(stdout,"%14.6le -- energy\n",result2);
     95    fprintf(stdout,"%14.6E -- energy\n",result2);
    9696
    9797    free((char*) bv);
  • trunk/ADOL-C/examples/additional_examples/lufact/LUdet.cpp

    r42 r88  
    8383    Adet >>= det;
    8484    trace_off();
    85     fprintf(stdout," Determinant (original):  %16.4le\n",det);
     85    fprintf(stdout," Determinant (original):  %16.4E\n",det);
    8686
    8787
     
    8989    /* Recomputation of determinant */
    9090    function(tag,depen,indep,args,&det);
    91     fprintf(stdout," Determinant (from tape): %16.4le\n",det);
     91    fprintf(stdout," Determinant (from tape): %16.4E\n",det);
    9292
    9393
     
    9898    for (i=0; i<size; i++) {
    9999        for (j=0; j<size; j++)
    100             fprintf(stdout," %14.6le",grad[i*size+j]);
     100            fprintf(stdout," %14.6E",grad[i*size+j]);
    101101        fprintf(stdout,"\n");
    102102    }
     
    108108    for (i=0; i<size; i++) {
    109109        for (j=0; j<size; j++)
    110             fprintf(stdout," %14.6le",hess[0][i*size+j]);
     110            fprintf(stdout," %14.6E",hess[0][i*size+j]);
    111111        fprintf(stdout,"\n");
    112112    }
  • trunk/ADOL-C/examples/additional_examples/lufact/LUsolve.cpp

    r42 r88  
    8787        Abx[i] >>= x[i];
    8888    trace_off();
    89     fprintf(stdout," x[0] (original):  %16.4le\n",x[0]);
     89    fprintf(stdout," x[0] (original):  %16.4E\n",x[0]);
    9090
    9191
     
    9393    /* Recomputation  */
    9494    function(tag,depen,indep,args,x);
    95     fprintf(stdout," x[0] (from tape): %16.4le\n",x[0]);
     95    fprintf(stdout," x[0] (from tape): %16.4E\n",x[0]);
    9696
    9797
     
    102102    for (i=0; i<depen; i++) {
    103103        for (j=0; j<indep; j++)
    104             fprintf(stdout," %14.6le",jac[i][j]);
     104            fprintf(stdout," %14.6E",jac[i][j]);
    105105        fprintf(stdout,"\n");
    106106    }
     
    112112    for (i=0; i<size; i++) {
    113113        for (j=0; j<size; j++)
    114             fprintf(stdout," %14.6le",laghessvec[i*size+j]);
     114            fprintf(stdout," %14.6E",laghessvec[i*size+j]);
    115115        fprintf(stdout,"\n");
    116116    }
  • trunk/ADOL-C/examples/additional_examples/ode/vgenodemain.cpp

    r42 r88  
    3737/****************************************************************************/
    3838/*                                                                   MACROS */
    39 #define TIMEFORMAT " %12.6le units,   %12.6le scunits,   %12.6le seconds\n"
     39#define TIMEFORMAT " %12.6E units,   %12.6E scunits,   %12.6E seconds\n"
    4040
    4141
     
    254254            err += fabs(w[j][i]*tau-indeps2[j][i+1]*(i+1))/avg;
    255255        }
    256     fprintf(stdout,"%14.6le = total error \n",err);
     256    fprintf(stdout,"%14.6E = total error \n",err);
    257257
    258258    /*------------------------------------------------------------------------*/
     
    266266            for (j=0; j<indepDim; j++) {
    267267                for (k=0; k<indepDim; k++)
    268                     fprintf(stdout,"%14.6le ",B[j][k][i]);
     268                    fprintf(stdout,"%14.6E ",B[j][k][i]);
    269269                fprintf(stdout,"\n");
    270270            }
     
    290290                           : fabs((w[j][i+1]-indeps2[j][i+1])/h) ;
    291291            }
    292             fprintf(stdout," Relative truncation errors in B(%d) ---> %14.6le\n",
     292            fprintf(stdout," Relative truncation errors in B(%d) ---> %14.6E\n",
    293293                    i,err);
    294294        }
  • trunk/ADOL-C/examples/additional_examples/scal/scalexam.cpp

    r42 r88  
    137137    /*--------------------------------------------------------------------------*/
    138138    if( id < 0 )
    139         fprintf(stdout,"Round-off error: %14.6le\n",(y-x).value());
     139        fprintf(stdout,"Round-off error: %14.6E\n",(y-x).value());
    140140
    141141    /*--------------------------------------------------------------------------*/
     
    176176        xp[i+2]=0;
    177177        forward(tag,1,1,i,i+1,xpoint,respoint);
    178         fprintf(stdout,"%d\t%14.6le\t\t%14.6le\n",i,res[i],yp[i]);
     178        fprintf(stdout,"%d\t%14.6E\t\t%14.6E\n",i,res[i],yp[i]);
    179179        reverse(tag,1,1,i,u,ypoint); // call higher order scalar reverse
    180180        reverse(tag,1,1,i,1,U,V);
    181181        yp[i+1] = yp[i]/(i+1);
    182182        if (V[0][0][i] != yp[i])
    183             fprintf(stdout,"%d-th component in error %14.6le\n",i,V[0][0][i]-yp[i]);
     183            fprintf(stdout,"%d-th component in error %14.6E\n",i,V[0][0][i]-yp[i]);
    184184    }
    185185    cout << "\nWhen n<0 all rows except the first two should vanish \n";
  • 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");
  • trunk/ADOL-C/examples/additional_examples/tapesave/useTape.cpp

    r42 r88  
    6060
    6161    /* print the results */
    62     fprintf(stdout,"f  = %le\n",f);
    63     fprintf(stdout,"df = (%le, %le, %le)\n",gradf[0],gradf[1],gradf[2]);
     62    fprintf(stdout,"f  = %E\n",f);
     63    fprintf(stdout,"df = (%E, %E, %E)\n",gradf[0],gradf[1],gradf[2]);
    6464
    6565    return 0;
  • trunk/ADOL-C/examples/additional_examples/timing/sgenmain.cpp

    r42 r88  
    3838/****************************************************************************/
    3939/*                                                                   MACROS */
    40 #define TIMEFORMAT " %12.6le units,   %12.6le seconds\n"
     40#define TIMEFORMAT " %12.6E units,   %12.6E seconds\n"
    4141
    4242
     
    319319            fprintf(stdout,"\n    Return value: %d\n",retVal);
    320320            fprintf(stdout,"    Should be the same values:\n");
    321             fprintf(stdout,"    (original) %12.8le =? %12.8le (forward from tape)\n",
     321            fprintf(stdout,"    (original) %12.8E =? %12.8E (forward from tape)\n",
    322322                    depOrig,depTape);
    323323        }
     
    370370            fprintf(stdout,"\n    Return value: %d\n",retVal);
    371371            fprintf(stdout,"    Should be the same values:\n");
    372             fprintf(stdout,"    (original) %12.8le =? %12.8le (forward from tape)\n",
     372            fprintf(stdout,"    (original) %12.8E =? %12.8E (forward from tape)\n",
    373373                    depOrig,YP[0]);
    374374        }
     
    429429            fprintf(stdout,"\n    Return value: %d\n",retVal);
    430430            fprintf(stdout,"    Should be the same values:\n");
    431             fprintf(stdout,"    (original) %12.8le =? %12.8le (forward from tape)\n",
     431            fprintf(stdout,"    (original) %12.8E =? %12.8E (forward from tape)\n",
    432432                    depOrig,YP[0]);
    433433        }
     
    795795            fprintf(stdout,"\n    Return value: %d\n",retVal);
    796796            fprintf(stdout,"    Should be the same values:\n");
    797             fprintf(stdout,"    (original) %12.8le =? %12.8le (forward from tape)\n",
     797            fprintf(stdout,"    (original) %12.8E =? %12.8E (forward from tape)\n",
    798798                    depOrig,depTape);
    799799        }
  • trunk/ADOL-C/examples/additional_examples/timing/vgenmain.cpp

    r42 r88  
    4040/****************************************************************************/
    4141/*                                                                   MACROS */
    42 #define TIMEFORMAT " %12.6le units,   %12.6le seconds\n"
     42#define TIMEFORMAT " %12.6E units,   %12.6E seconds\n"
    4343
    4444
  • trunk/ADOL-C/src/drivers/taylor.c

    r87 r88  
    350350        if (ZERO > v) {
    351351            fprintf(DIAG_OUT,
    352                     "Error:LUFactorisation(..): no Pivot in step %d (%le)\n",k+1,v);
     352                    "Error:LUFactorisation(..): no Pivot in step %d (%E)\n",k+1,v);
    353353            return -(k+1);
    354354        }
Note: See TracChangeset for help on using the changeset viewer.