Ignore:
Timestamp:
Dec 7, 2009 9:49:34 AM (10 years ago)
Author:
awalther
Message:

inclusion of error function for gcc compiler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/src/adouble.h

    r42 r61  
    3434using std::ostream;
    3535using std::istream;
     36#ifdef ATRIG_ERF
     37#if defined(AD_ERR_FUN)
     38#include <tr1/cmath>
     39#endif
     40#endif
    3641
    3742#include <common.h>
     
    10111016adouble asinh (const adouble &a) {
    10121017    adouble tmp;
    1013     tmp.val=ADOLC_MATH_NSP::asinh(a.val);
     1018    tmp.val=ADOLC_MATH_NSP_ERF::asinh(a.val);
    10141019    double tmp2=ADOLC_MATH_NSP::sqrt(a.val*a.val+1);
    10151020    FOR_I_EQ_0_LT_NUMDIR
     
    10201025adouble acosh (const adouble &a) {
    10211026    adouble tmp;
    1022     tmp.val=ADOLC_MATH_NSP::acosh(a.val);
     1027    tmp.val=ADOLC_MATH_NSP_ERF::acosh(a.val);
    10231028    double tmp2=ADOLC_MATH_NSP::sqrt(a.val*a.val-1);
    10241029    FOR_I_EQ_0_LT_NUMDIR
     
    10291034adouble atanh (const adouble &a) {
    10301035    adouble tmp;
    1031     tmp.val=ADOLC_MATH_NSP::atanh(a.val);
     1036    tmp.val=ADOLC_MATH_NSP_ERF::atanh(a.val);
    10321037    double tmp2=1-a.val*a.val;
    10331038    FOR_I_EQ_0_LT_NUMDIR
     
    12291234adouble erf (const adouble &a) {
    12301235    adouble tmp;
    1231     tmp.val=ADOLC_MATH_NSP::erf(a.val);
     1236    tmp.val=ADOLC_MATH_NSP_ERF::erf(a.val);
    12321237    double tmp2 = 2.0 /
    1233         ADOLC_MATH_NSP::sqrt(ADOLC_MATH_NSP::acos(-1.0)) *
    1234         ADOLC_MATH_NSP::exp(-a.val*a.val);
     1238        ADOLC_MATH_NSP_ERF::sqrt(ADOLC_MATH_NSP::acos(-1.0)) *
     1239        ADOLC_MATH_NSP_ERF::exp(-a.val*a.val);
    12351240    FOR_I_EQ_0_LT_NUMDIR
    12361241    tmp.ADVAL_I=tmp2*a.ADVAL_I;
Note: See TracChangeset for help on using the changeset viewer.