Mercurial > hg > octave-nkf
diff liboctave/CollocWt.cc @ 15220:61822c866ba1
use std::numeric_limits<T>::epsilon in C++ code
* __contourc__.cc, __qp__.cc, quadcc.cc, qz.cc, eigs.cc, mex.cc,
graphics.cc, CMatrix.cc, CollocWt.cc, DASPK-opts.in, DASRT-opts.in,
DASSL-opts.in, LSODE-opts.in, Quad-opts.in, Range.cc, dMatrix.cc,
eigs-base.cc, fCMatrix.cc, fMatrix.cc: Replace DBL_EPSILON and
FLT_EPSILON with std::numeric_limits<T>::epsilon.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 23 Aug 2012 12:13:59 -0400 |
parents | 3d8ace26c5b4 |
children |
line wrap: on
line diff
--- a/liboctave/CollocWt.cc +++ b/liboctave/CollocWt.cc @@ -230,12 +230,12 @@ if (++k > 100 || xisnan (z)) return false; - if (std::abs (z) <= 100 * DBL_EPSILON) + if (std::abs (z) <= 100 * std::numeric_limits<double>::epsilon ()) done = true; } root[i] = x; - x = x + sqrt (DBL_EPSILON); + x = x + sqrt (std::numeric_limits<double>::epsilon ()); } // Add interpolation points at x = 0 and/or x = 1.