Changeset 3498 for trunk/test_more


Ignore:
Timestamp:
Dec 24, 2014 9:37:14 AM (5 years ago)
Author:
bradbell
Message:

Fix division of vector by scalar (does not work for all simple vectors).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test_more/erf.cpp

    r3495 r3498  
    6262        x2[0] = 0.0;
    6363        y2    = f.Forward(2, x2);
    64         check = df.Forward(1, x1) / 2.0;
    65         ok   &= NearEqual(check[0], y2[0], 0., 2e-3);
     64        check = df.Forward(1, x1);
     65        ok   &= NearEqual(check[0] / 2.0, y2[0], 0., 2e-3);
    6666# if CPPAD_COMPILER_HAS_ERF
    6767        ok   &= NearEqual(check[0], y2[0], eps, eps);
     
    7272        x3[0] = 0.0;
    7373        y3    = f.Forward(3, x3);
    74         check = df.Forward(2, x2) / 3.0;
    75         ok   &= NearEqual(check[0], y3[0], 0., 2e-3);
     74        check = df.Forward(2, x2);
     75        ok   &= NearEqual(check[0] / 3.0, y3[0], 0., 2e-3);
    7676# if CPPAD_COMPILER_HAS_ERF
    7777        ok   &= NearEqual(check[0], y3[0], eps, eps);
Note: See TracChangeset for help on using the changeset viewer.