Changeset 3870


Ignore:
Timestamp:
Jan 20, 2017 9:26:20 PM (3 years ago)
Author:
bradbell
Message:

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 0c9a72f937c85198e73fb532438dcd274c4db9c0
end hash code: b103d4dd72a281b542373a3a7e256c8020b7b981

commit b103d4dd72a281b542373a3a7e256c8020b7b981
Author: Brad Bell <bradbell@…>
Date: Fri Jan 20 17:53:00 2017 -0700

Convert derivatives to Taylor coefficients before comparing to machine epsilon.

Location:
trunk
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/AUTHORS

    r3869 r3870  
    22             ===========================================
    33
    4 To date, 2017-01-19, Bradley M. Bell is the sole author of CppAD.
     4To date, 2017-01-20, Bradley M. Bell is the sole author of CppAD.
    55While Bradley M. Bell worked for the University of Washington during
    66the development of CppAD, the following are also true:
  • trunk/CMakeLists.txt

    r3869 r3870  
    1717
    1818# cppad_version is used by set_version.sh to get the version number.
    19 SET(cppad_version      "20170119" )
     19SET(cppad_version      "20170120" )
    2020SET(cppad_url          "http://www.coin-or.org/CppAD" )
    2121SET(cppad_description  "Differentiation of C++ Algorithms" )
  • trunk/bin/batch_edit.sh

    r3869 r3870  
    1010# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1111# -----------------------------------------------------------------------------
    12 revert_list=`
    13         ls introduction/*/*.cpp
    14 `
     12revert_list='
     13'
    1514revert_list="$revert_list omh/whats_new/whats_new_15.omh"
    1615move_list='
     
    1918#
    2019cat << EOF > junk.sed
    21 s|1e-10|eps99|g
     20s|NearEqual(jfac\\*\\([^,]*\\), *value *, *jfac\\*eps99 *, *jfac\\*eps99)|NearEqual(\\1, value/jfac, eps99, eps99)|
     21s|NearEqual(jfac\\*\\([^,]*\\), *value *, *eps99 *, *eps99)|NearEqual(\\1, value/jfac, eps99, eps99)|
    2222EOF
    2323# -----------------------------------------------------------------------------
  • trunk/configure

    r3869 r3870  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.69 for cppad 20170119.
     3# Generated by GNU Autoconf 2.69 for cppad 20170120.
    44#
    55# Report bugs to <cppad@list.coin-or.org>.
     
    581581PACKAGE_NAME='cppad'
    582582PACKAGE_TARNAME='cppad'
    583 PACKAGE_VERSION='20170119'
    584 PACKAGE_STRING='cppad 20170119'
     583PACKAGE_VERSION='20170120'
     584PACKAGE_STRING='cppad 20170120'
    585585PACKAGE_BUGREPORT='cppad@list.coin-or.org'
    586586PACKAGE_URL=''
     
    14101410  # This message is too long to be a string in the A/UX 3.1 sh.
    14111411  cat <<_ACEOF
    1412 \`configure' configures cppad 20170119 to adapt to many kinds of systems.
     1412\`configure' configures cppad 20170120 to adapt to many kinds of systems.
    14131413
    14141414Usage: $0 [OPTION]... [VAR=VALUE]...
     
    14801480if test -n "$ac_init_help"; then
    14811481  case $ac_init_help in
    1482      short | recursive ) echo "Configuration of cppad 20170119:";;
     1482     short | recursive ) echo "Configuration of cppad 20170120:";;
    14831483   esac
    14841484  cat <<\_ACEOF
     
    16141614if $ac_init_version; then
    16151615  cat <<\_ACEOF
    1616 cppad configure 20170119
     1616cppad configure 20170120
    16171617generated by GNU Autoconf 2.69
    16181618
     
    22432243running configure, to aid debugging if configure makes a mistake.
    22442244
    2245 It was created by cppad $as_me 20170119, which was
     2245It was created by cppad $as_me 20170120, which was
    22462246generated by GNU Autoconf 2.69.  Invocation command line was
    22472247
     
    31333133# Define the identity of the package.
    31343134 PACKAGE='cppad'
    3135  VERSION='20170119'
     3135 VERSION='20170120'
    31363136
    31373137
     
    85738573# values after options handling.
    85748574ac_log="
    8575 This file was extended by cppad $as_me 20170119, which was
     8575This file was extended by cppad $as_me 20170120, which was
    85768576generated by GNU Autoconf 2.69.  Invocation command line was
    85778577
     
    86308630ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
    86318631ac_cs_version="\\
    8632 cppad config.status 20170119
     8632cppad config.status 20170120
    86338633configured by $0, generated by GNU Autoconf 2.69,
    86348634  with options \\"\$ac_cs_config\\"
  • trunk/configure.ac

    r3869 r3870  
    1212dnl Process this file with autoconf to produce a configure script.
    1313dnl   package   version              bug-report
    14 AC_INIT([cppad], [20170119], [cppad@list.coin-or.org])
     14AC_INIT([cppad], [20170120], [cppad@list.coin-or.org])
    1515AM_SILENT_RULES([yes])
    1616
  • trunk/doc.omh

    r3869 r3870  
    9191$comment bin/version assumes that : follows cppad version number here$$
    9292$section
    93 cppad-20170119: A Package for Differentiation of C++ Algorithms
     93cppad-20170120: A Package for Differentiation of C++ Algorithms
    9494$$
    9595$mindex AD algorithmic differentiation automatic C++ algorithm derivative CppAD version cppad.hpp$$
  • trunk/omh/install/download.omh

    r3869 r3870  
    9696$rnext
    9797current  $cnext EPL $cnext $href%
    98 http://www.coin-or.org/download/source/CppAD/cppad-20170119.epl.tgz%
    99 cppad-20170119.epl.tgz%$$
     98http://www.coin-or.org/download/source/CppAD/cppad-20170120.epl.tgz%
     99cppad-20170120.epl.tgz%$$
    100100$rnext
    101101current  $cnext GPL $cnext $href%
    102 http://www.coin-or.org/download/source/CppAD/cppad-20170119.gpl.tgz%
    103 cppad-20170119.gpl.tgz%$$
     102http://www.coin-or.org/download/source/CppAD/cppad-20170120.gpl.tgz%
     103cppad-20170120.gpl.tgz%$$
    104104$tend
    105105
  • trunk/omh/whats_new/whats_new_17.omh

    r3864 r3870  
    1313$spell
    1414        CppAD
     15        doxygen
     16        cppad
     17        hpp
    1518$$
    1619
    1720$section Changes and Additions to CppAD During 2017$$
    1821
     22$head 01-19$$
     23Convert more examples / tests to use a multiple of machine epsilon
     24instead of $code 1e-10$$.
     25
     26$head 01-18$$
     27$list number$$
     28Fix developer
     29$href%https://www.coin-or.org/CppAD/Doc/doxydoc/html/%doxydoc%$$
     30documentation so that it works with newer version of doxygen.
     31$lnext
     32Fix a Visual C++ 2015 compilation problem in friend declarations
     33in the file $code cppad/local/ad_tape.hpp$$.
     34$lend
     35
     36$head 01-17$$
     37Change computed assignment to
     38$cref/compound assignment/compound_assign/$$.
    1939
    2040$end
  • trunk/test_more/acos.cpp

    r3869 r3870  
    5050        {       jfac *= j;
    5151                w     = f.Forward(j, v);
    52                 ok &= NearEqual(jfac*w[0], value, jfac*eps99 , jfac*eps99);// d^jz/du^j
     52                ok &= NearEqual(w[0], value/jfac, eps99, eps99);// d^jz/du^j
    5353                v[0]  = 0.;
    5454                value = 0.;
     
    6262        value = 1.;
    6363        for(j = 0; j < p; j++)
    64         {       ok &= NearEqual(jfac*r[j], value, jfac*eps99 , jfac*eps99);// d^jz/du^j
     64        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99);// d^jz/du^j
    6565                jfac *= (j + 1);
    6666                value = 0.;
  • trunk/test_more/add.cpp

    r3869 r3870  
    109109        {       jfac *= j;
    110110                w     = f.Forward(j, v);
    111                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     111                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    112112                v[0]  = 0.;
    113113                value = 0.;
     
    121121        value = 2.;
    122122        for(j = 0; j < p; j++)
    123         {       ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     123        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    124124                jfac *= (j + 1);
    125125                value = 0.;
  • trunk/test_more/add_eq.cpp

    r3869 r3870  
    107107        {       jfac *= j;
    108108                w     = f.Forward(j, v);
    109                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     109                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    110110                v[0]  = 0.;
    111111                value = 0.;
     
    119119        value = 2.;
    120120        for(j = 0; j < p; j++)
    121         {       ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     121        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    122122                jfac *= (j + 1);
    123123                value = 0.;
  • trunk/test_more/asin.cpp

    r3869 r3870  
    5151        {       jfac *= j;
    5252                w     = f.Forward(j, v);
    53                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     53                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    5454                v[0]  = 0.;
    5555                value = 0.;
     
    6363        value = 1.;
    6464        for(j = 0; j < p; j++)
    65         {       ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     65        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    6666                jfac *= (j + 1);
    6767                value = 0.;
  • trunk/test_more/atan.cpp

    r3869 r3870  
    116116        {       jfac *= j;
    117117                w     = f.Forward(j, v);
    118                 ok &= NearEqual(jfac*w[0], value, jfac*eps99 , jfac*eps99);// d^jz/du^j
     118                ok &= NearEqual(w[0], value/jfac, eps99, eps99);// d^jz/du^j
    119119                v[0]  = 0.;
    120120                value = 0.;
     
    128128        value = 1.;
    129129        for(j = 0; j < p; j++)
    130         {       ok &= NearEqual(jfac*r[j], value, jfac*eps99 , jfac*eps99);// d^jz/du^j
     130        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99);// d^jz/du^j
    131131                jfac *= (j + 1);
    132132                value = 0.;
  • trunk/test_more/cos.cpp

    r3869 r3870  
    6060
    6161                jfac *= j;
    62                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     62                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    6363                v[0]  = 0.;
    6464        }
     
    8080                else    value = cos_u;
    8181
    82                 ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     82                ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    8383
    8484                jfac *= (j + 1);
  • trunk/test_more/cosh.cpp

    r3869 r3870  
    5656
    5757                jfac *= j;
    58                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     58                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    5959                v[0]  = 0.;
    6060        }
     
    7272                else    value = cosh_u;
    7373
    74                 ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     74                ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    7575
    7676                jfac *= (j + 1);
  • trunk/test_more/div.cpp

    r3869 r3870  
    144144                jfac *= j;
    145145                w     = f.Forward(j, v);
    146                 ok &= NearEqual(jfac*w[0], value, eps99, eps99); // d^jz/du^j
     146                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    147147                v[0]  = 0.;
    148148                value = 0.;
     
    157157        for(j = 0; j < p; j++)
    158158        {
    159                 ok &= NearEqual(jfac*r[j], value, eps99, eps99); // d^jz/du^j
     159                ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    160160                jfac *= (j + 1);
    161161                value = 0.;
  • trunk/test_more/div_eq.cpp

    r3869 r3870  
    125125        {       jfac *= j;
    126126                w     = f.Forward(j, v);
    127                 ok &= NearEqual(jfac*w[0], value, eps99, eps99); // d^jz/du^j
     127                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    128128                v[0]  = 0.;
    129129                value = 0.;
     
    137137        value = 1./8.;
    138138        for(j = 0; j < p; j++)
    139         {       ok &= NearEqual(jfac*r[j], value, eps99, eps99); // d^jz/du^j
     139        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    140140                jfac *= (j + 1);
    141141                value = 0.;
  • trunk/test_more/log.cpp

    r3869 r3870  
    120120        {       jfac *= j;
    121121                w     = f.Forward(j, v);
    122                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     122                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    123123                v[0]  = 0.;
    124124                value = 0.;
     
    132132        value = 1.;
    133133        for(j = 0; j < p; j++)
    134         {       ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     134        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    135135                jfac *= (j + 1);
    136136                value = 0.;
  • trunk/test_more/mul.cpp

    r3869 r3870  
    136136                jfac *= j;
    137137                w     = f.Forward(j, v);
    138                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     138                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    139139                v[0]  = 0.;
    140140        }
     
    153153                else    value = 0.;
    154154
    155                 ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     155                ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    156156                jfac *= (j + 1);
    157157        }
  • trunk/test_more/mul_eq.cpp

    r3869 r3870  
    120120                jfac *= j;
    121121                w     = f.Forward(j, v);
    122                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     122                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    123123                v[0]  = 0.;
    124124        }
     
    137137                else    value = 0.;
    138138
    139                 ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     139                ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    140140                jfac *= (j + 1);
    141141        }
  • trunk/test_more/sin.cpp

    r3869 r3870  
    6060
    6161                jfac *= j;
    62                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     62                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    6363                v[0]  = 0.;
    6464        }
     
    8080                else    value = sin_u;
    8181
    82                 ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     82                ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    8383
    8484                jfac *= (j + 1);
  • trunk/test_more/sin_cos.cpp

    r3869 r3870  
    107107                // derivative w.r.t y of sin^{(j)} (x * y) * y^j
    108108                double value = sinjp * yj * x + j * sinj * yj / y;
    109                 ok &= NearEqual(jfac*r[p+j], value , eps99 , eps99);
     109                ok &= NearEqual(r[p+j], value/jfac, eps99, eps99);
    110110
    111111                jfac  *= (j + 1);
     
    204204                // derivative w.r.t y of cos^{(j)} (x * y) * y^j
    205205                double value = cosjp * yj * x + j * cosj * yj / y;
    206                 ok &= NearEqual(jfac*r[p+j], value , eps99 , eps99);
     206                ok &= NearEqual(r[p+j], value/jfac, eps99, eps99);
    207207
    208208                jfac  *= (j + 1);
     
    293293                // derivative w.r.t y of cosh^{(j)} (x * y) * y^j
    294294                double value = coshjp * yj * x + j * coshj * yj / y;
    295                 ok &= NearEqual(jfac*r[p+j], value , eps99 , eps99);
     295                ok &= NearEqual(r[p+j], value/jfac, eps99, eps99);
    296296
    297297                jfac  *= (j + 1);
     
    382382                // derivative w.r.t y of sinh^{(j)} (x * y) * y^j
    383383                double value = sinhjp * yj * x + j * sinhj * yj / y;
    384                 ok &= NearEqual(jfac*r[p+j], value , eps99 , eps99);
     384                ok &= NearEqual(r[p+j], value/jfac, eps99, eps99);
    385385
    386386                jfac  *= (j + 1);
  • trunk/test_more/sinh.cpp

    r3869 r3870  
    5656
    5757                jfac *= j;
    58                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     58                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    5959                v[0]  = 0.;
    6060        }
     
    7272                else    value = sin_u;
    7373
    74                 ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     74                ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    7575
    7676                jfac *= (j + 1);
  • trunk/test_more/sqrt.cpp

    r3869 r3870  
    120120        {       jfac *= j;
    121121                w     = f.Forward(j, v);
    122                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     122                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    123123                v[0]  = 0.;
    124124                value = 0.;
     
    132132        value = 1.;
    133133        for(j = 0; j < p; j++)
    134         {       ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     134        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    135135                jfac *= (j + 1);
    136136                value = 0.;
  • trunk/test_more/sub.cpp

    r3869 r3870  
    111111        {       jfac *= j;
    112112                w     = f.Forward(j, v);
    113                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     113                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    114114                v[0]  = 0.;
    115115                value = 0.;
     
    123123        value = -1.;
    124124        for(j = 0; j < p; j++)
    125         {       ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     125        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    126126                jfac *= (j + 1);
    127127                value = 0.;
  • trunk/test_more/sub_eq.cpp

    r3869 r3870  
    103103        {       jfac *= j;
    104104                w     = f.Forward(j, v);
    105                 ok &= NearEqual(jfac*w[0], value, eps99 , eps99); // d^jz/du^j
     105                ok &= NearEqual(w[0], value/jfac, eps99, eps99); // d^jz/du^j
    106106                v[0]  = 0.;
    107107                value = 0.;
     
    115115        value = -1.;
    116116        for(j = 0; j < p; j++)
    117         {       ok &= NearEqual(jfac*r[j], value, eps99 , eps99); // d^jz/du^j
     117        {       ok &= NearEqual(r[j], value/jfac, eps99, eps99); // d^jz/du^j
    118118                jfac *= (j + 1);
    119119                value = 0.;
Note: See TracChangeset for help on using the changeset viewer.