Changeset 3304 for trunk/test_more


Ignore:
Timestamp:
May 24, 2014 11:52:20 AM (6 years ago)
Author:
bradbell
Message:

Avoid using std::round becasue it was not in C99.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test_more/forward_dir.cpp

    r3303 r3304  
    541541        // DisOp (test assuming that AddvvOp is correct)
    542542        double round_off(const double& x)
    543         {       return std::round(x); }
     543        {       // std::round(x); is C++11, so we avoid using it
     544                return std::floor( x + 0.5 );
     545        }
    544546        CPPAD_DISCRETE_FUNCTION(double, round_off)
    545547        bool dis_op(void)
Note: See TracChangeset for help on using the changeset viewer.