Changeset 2884


Ignore:
Timestamp:
Aug 6, 2013 10:29:20 AM (6 years ago)
Author:
bradbell
Message:

Fix failure of test_more/limits.cpp on some systems.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bug/gcc_complex.sh

    r2883 r2884  
    11#! /bin/bash -e
    2 # -----------------------------------------------
     2# $Id$
     3# -----------------------------------------------------------------------------
     4# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
     5#
     6# CppAD is distributed under multiple licenses. This distribution is under
     7# the terms of the
     8#                     Eclipse Public License Version 1.0.
     9#
     10# A copy of this license is included in the COPYING file of this distribution.
     11# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
     12# -----------------------------------------------------------------------------
    313echo_eval() {
    414        echo $*
  • trunk/omh/whats_new/whats_new_13.omh

    r2868 r2884  
    1414$dollar @$$
    1515$spell
     16        inf
    1617        const
    1718        algo
     
    4950assist you in learning about changes between various versions of CppAD.
    5051
     52$head 08-06$$
     53Fix a case where the test $code test_more/limits.cpp$$ failed because
     54$codep
     55        double inf   = std::numeric_limits<double>::infinity();
     56        double check = std::complex<double>(inf) / std::complex<float>(1.)
     57$$
     58can result in the imaginary part of $code check$$ being $code - nan$$.
     59
    5160$head 07-26$$
    5261Allow for use of $code const::string&$$ as a possible type for
  • trunk/test_more/limits.cpp

    r2756 r2884  
    107107                value hun( Type(100) );
    108108                value tmp( Type(0) );
    109                 //
     109
     110                // In complex case, this operaiton can result in (inf, 0)
    110111                tmp.set( max2.get() * hun.get() );
     112
     113                // In complex case, this operaiotn can result in (inf,-nan)
     114                // (where nan corresponds to inf * 0)
    111115                tmp.set( tmp.get() / hun.get() );
    112                 // tmp is infinite
    113                 ok        &= abs_geq(tmp.get() / max2.get() - one.get(), eps3.get() );
     116
     117                if( ! CppAD::isnan( tmp.get() ) ) ok &= abs_geq(
     118                        tmp.get() / max2.get() - one.get(), eps3.get()
     119                );
    114120                //
    115121                tmp.set( max2.get() / hun.get() );
Note: See TracChangeset for help on using the changeset viewer.