comparison 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
comparison
equal deleted inserted replaced
15219:aeba1adfd76b 15220:61822c866ba1
228 // enough in all cases. 228 // enough in all cases.
229 229
230 if (++k > 100 || xisnan (z)) 230 if (++k > 100 || xisnan (z))
231 return false; 231 return false;
232 232
233 if (std::abs (z) <= 100 * DBL_EPSILON) 233 if (std::abs (z) <= 100 * std::numeric_limits<double>::epsilon ())
234 done = true; 234 done = true;
235 } 235 }
236 236
237 root[i] = x; 237 root[i] = x;
238 x = x + sqrt (DBL_EPSILON); 238 x = x + sqrt (std::numeric_limits<double>::epsilon ());
239 } 239 }
240 240
241 // Add interpolation points at x = 0 and/or x = 1. 241 // Add interpolation points at x = 0 and/or x = 1.
242 242
243 if (n0 != 0) 243 if (n0 != 0)