Changeset 3083


Ignore:
Timestamp:
Jan 10, 2014 1:35:07 PM (6 years ago)
Author:
bradbell
Message:

atan2.hpp: Make conversion from double explicit.
optimize.hpp: fix which is debug and wich is speed case.
whats_new_14.omh: start this years whats new.
whats_new.omh:start this years whats new.
atan2.cpp: add test that demonstrates bug.
test_more.cpp: change Atan2 to atan2.

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/cppad/local/atan2.hpp

    r2506 r3083  
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
     
    101101        AD<Base> theta;
    102102
    103         AD<Base> zero = 0;
    104         AD<Base> pi2  = 2. * atan(1.);
    105         AD<Base> pi   = 2. * pi2;
     103        AD<Base> zero(0.);
     104        AD<Base> pi2(2. * atan(1.));
     105        AD<Base> pi(2. * pi2);
    106106
    107107        AD<Base> ax = abs(x);
  • trunk/cppad/local/optimize.hpp

    r3081 r3083  
    18571857                        {       // call users function for this operation
    18581858                                user_atom->set_id(user_id);
    1859 # ifndef NDEBUG
     1859# ifdef NDEBUG
    18601860                                if( user_set )
    18611861                                {       user_atom->
  • trunk/omh/whats_new/whats_new.omh

    r2709 r3083  
    11$Id$
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    2525
    2626$children%
     27        omh/whats_new/whats_new_14.omh%
    2728        omh/whats_new/whats_new_13.omh%
    2829        omh/whats_new/whats_new_12.omh%
     
    3940
    4041$head This Year$$
    41 $cref whats_new_13$$
     42$cref whats_new_14$$
    4243
    4344$head Previous Years$$
     45$cref whats_new_13$$
    4446$cref whats_new_12$$
    4547$cref whats_new_11$$,
  • trunk/test_more/atan2.cpp

    r2506 r3083  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    1818# include <cmath>
    1919
    20 bool Atan2(void)
     20namespace { // begin empty namespace
     21
     22bool ad_ad(void)
     23{       bool ok = true;
     24        using CppAD::AD;
     25
     26        AD< AD<double> > x(2.), y(2.);
     27        AD< AD<double> > z = atan2(y, x);
     28        CppAD::NearEqual( Value( Value(z) ), atan(1.), 1e-10, 1e-10 );
     29
     30        return ok;
     31}
     32
     33bool general(void)
    2134{       bool ok = true;
    2235
     
    90103        return ok;
    91104}
     105
     106} // end empty namespace
     107
     108bool atan2(void)
     109{       bool ok = true;
     110        ok     &= ad_ad();
     111        ok     &= general();
     112
     113        return ok;
     114}
  • trunk/test_more/test_more.cpp

    r2859 r3083  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    2727extern bool assign(void);
    2828extern bool Atan(void);
    29 extern bool Atan2(void);
     29extern bool atan2(void);
    3030extern bool base_adolc(void);
    3131extern bool base_alloc_test(void);
     
    139139        ok &= Run( assign,          "assign"         );
    140140        ok &= Run( Atan,            "Atan"           );
    141         ok &= Run( Atan2,           "Atan2"          );
     141        ok &= Run( atan2,           "atan2"          );
    142142        ok &= Run( check_simple_vector, "check_simple_vector" );
    143143        ok &= Run( checkpoint,      "checkpoint"     );
Note: See TracChangeset for help on using the changeset viewer.