Changeset 101


Ignore:
Timestamp:
Mar 5, 2010 7:58:02 AM (11 years ago)
Author:
awalther
Message:

fix definition of condassign in double version

File:
1 edited

Legend:

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

    r83 r101  
    3333void condassign( double &res, const double &cond,
    3434                 const double &arg1, const double &arg2 ) {
    35     res = cond ? arg1 : arg2;
     35    res = cond > 0 ? arg1 : arg2;
    3636}
    3737
     
    3939void condassign( double &res, const double &cond,
    4040                 const double &arg) {
    41     res = cond ? arg : res;
     41    res = cond > 0 ? arg : res;
    4242}
    4343
Note: See TracChangeset for help on using the changeset viewer.