Ignore:
Timestamp:
Oct 14, 2013 7:06:18 AM (7 years ago)
Author:
bradbell
Message:
  1. Make sure all '# defines' have an '# undef' and vise-verser.
  2. Add adolc tests to jenkins.sh.

check_define.sh: New reoutine that check defines have matching undef.
package.sh: run check_define.sh.
search.sh: add missing source directory to search.
configure.hpp.in: fix bug in speed tests (name of preprocessor macro).
pow.hpp: fix comment.
thread_alloc.hpp: fix spelling in comment.
jenkins.sh: Automatically set LD_LIBRARY_PATH.
base_adolc.hpp: fix problem when using ADOL-C-2.4.1
adolc_prefix.omh: add link to get_adolc.sh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cppad/example/base_adolc.hpp

    r2506 r2939  
    33# define CPPAD_BASE_ADOLC_INCLUDED
    44/* --------------------------------------------------------------------------
    5 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     5CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
    66
    77CppAD is distributed under multiple licenses. This distribution is under
     
    222222namespace CppAD {
    223223        inline adouble sign(const adouble& x)
    224         {       adouble s_plus, s_minus;
     224        {       adouble s_plus, s_minus, half(.5);
    225225                // set s_plus to sign(x)/2,  except for case x == 0, s_plus = -.5
    226                 condassign(s_plus,  +x, -.5, .5);
     226                condassign(s_plus,  +x, -half, +half);
    227227                // set s_minus to -sign(x)/2, except for case x == 0, s_minus = -.5
    228                 condassign(s_minus, -x, -.5, .5);
     228                condassign(s_minus, -x, -half, +half);
    229229                // set s to sign(x)
    230230                return s_plus - s_minus;
Note: See TracChangeset for help on using the changeset viewer.