# HG changeset patch # User John W. Eaton # Date 1345738439 14400 # Node ID 61822c866ba1a01d5dd3ee62dd0c81389b729282 # Parent aeba1adfd76b8bac513c98410c363bbc2309c318 use std::numeric_limits::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::epsilon. diff -r aeba1adfd76b -r 61822c866ba1 libinterp/corefcn/__contourc__.cc --- a/libinterp/corefcn/__contourc__.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/libinterp/corefcn/__contourc__.cc Thu Aug 23 12:13:59 2012 -0400 @@ -229,8 +229,8 @@ f[2] = Z(r+1, c+1) - lvl; for (unsigned int i = 0; i < 4; i++) - if (fabs(f[i]) < DBL_EPSILON) - f[i] = DBL_EPSILON; + if (fabs(f[i]) < std::numeric_limits::epsilon ()) + f[i] = std::numeric_limits::epsilon (); if (f[1] * f[2] < 0) mark(r, c) += 2; @@ -248,8 +248,8 @@ f[2] = Z(r+1, c+1) - lvl; for (unsigned int i = 0; i < 4; i++) - if (fabs(f[i]) < DBL_EPSILON) - f[i] = DBL_EPSILON; + if (fabs(f[i]) < std::numeric_limits::epsilon ()) + f[i] = std::numeric_limits::epsilon (); if (f[0] * f[1] < 0) mark(r, c) += 1; diff -r aeba1adfd76b -r 61822c866ba1 libinterp/corefcn/__qp__.cc --- a/libinterp/corefcn/__qp__.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/libinterp/corefcn/__qp__.cc Thu Aug 23 12:13:59 2012 -0400 @@ -60,7 +60,7 @@ octave_idx_type tmp = A_nr > A_nc ? A_nr : A_nc; - double tol = tmp * s(0) * DBL_EPSILON; + double tol = tmp * s(0) * std::numeric_limits::epsilon (); octave_idx_type n = s.length (); @@ -76,7 +76,7 @@ retval.resize (A_nc, 0); for (octave_idx_type i = 0; i < retval.numel (); i++) - if (std::abs (retval(i)) < DBL_EPSILON) + if (std::abs (retval(i)) < std::numeric_limits::epsilon ()) retval(i) = 0; } @@ -94,7 +94,7 @@ iter = 0; - double rtol = sqrt (DBL_EPSILON); + double rtol = sqrt (std::numeric_limits::epsilon ()); // Problem dimension. octave_idx_type n = x.length (); @@ -209,7 +209,7 @@ // Following the negative curvature of H. - if (p.transpose () * g > DBL_EPSILON) + if (p.transpose () * g > std::numeric_limits::epsilon ()) p = -p; info = 1; @@ -307,7 +307,7 @@ // Computing the step pz. p = Z * eVrH; - if (p.transpose () * g > DBL_EPSILON) + if (p.transpose () * g > std::numeric_limits::epsilon ()) p = -p; } } diff -r aeba1adfd76b -r 61822c866ba1 libinterp/corefcn/quadcc.cc --- a/libinterp/corefcn/quadcc.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/libinterp/corefcn/quadcc.cc Thu Aug 23 12:13:59 2012 -0400 @@ -1885,7 +1885,7 @@ /* Should we drop this interval? */ if ((m + h * xi[0]) >= (m + h * xi[1]) || (m + h * xi[31]) >= (m + h * xi[32]) - || iv->err < fabs (iv->igral) * DBL_EPSILON * 10) + || iv->err < fabs (iv->igral) * std::numeric_limits::epsilon () * 10) { /* printf diff -r aeba1adfd76b -r 61822c866ba1 libinterp/corefcn/qz.cc --- a/libinterp/corefcn/qz.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/libinterp/corefcn/qz.cc Thu Aug 23 12:13:59 2012 -0400 @@ -849,7 +849,7 @@ nn, nn, aa.data (), nn, work.fortran_vec (), inf_norm F77_CHAR_ARG_LEN (1))); - double eps = DBL_EPSILON * inf_norm * nn; + double eps = std::numeric_limits::epsilon () * inf_norm * nn; #ifdef DEBUG_SORT std::cout << "qz: calling dsubsp: aa=" << std::endl; diff -r aeba1adfd76b -r 61822c866ba1 libinterp/dldfcn/eigs.cc --- a/libinterp/dldfcn/eigs.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/libinterp/dldfcn/eigs.cc Thu Aug 23 12:13:59 2012 -0400 @@ -329,7 +329,7 @@ bool a_is_sparse = false; ColumnVector permB; int arg_offset = 0; - double tol = DBL_EPSILON; + double tol = std::numeric_limits::epsilon (); int maxit = 300; int disp = 0; octave_idx_type p = -1; diff -r aeba1adfd76b -r 61822c866ba1 libinterp/interp-core/mex.cc --- a/libinterp/interp-core/mex.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/libinterp/interp-core/mex.cc Thu Aug 23 12:13:59 2012 -0400 @@ -2513,7 +2513,7 @@ double mxGetEps (void) { - return DBL_EPSILON; + return std::numeric_limits::epsilon (); } double diff -r aeba1adfd76b -r 61822c866ba1 libinterp/interpfcn/graphics.cc --- a/libinterp/interpfcn/graphics.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/libinterp/interpfcn/graphics.cc Thu Aug 23 12:13:59 2012 -0400 @@ -5930,7 +5930,7 @@ min_val = min_pos; } // FIXME -- maybe this test should also be relative? - if (std::abs (min_val - max_val) < sqrt (DBL_EPSILON)) + if (std::abs (min_val - max_val) < sqrt (std::numeric_limits::epsilon ())) { // Widen range when too small if (min_val >= 0) @@ -5965,7 +5965,7 @@ max_val = 1; } // FIXME -- maybe this test should also be relative? - else if (std::abs (min_val - max_val) < sqrt (DBL_EPSILON)) + else if (std::abs (min_val - max_val) < sqrt (std::numeric_limits::epsilon ())) { min_val -= 0.1 * std::abs (min_val); max_val += 0.1 * std::abs (max_val); diff -r aeba1adfd76b -r 61822c866ba1 liboctave/CMatrix.cc --- a/liboctave/CMatrix.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/CMatrix.cc Thu Aug 23 12:13:59 2012 -0400 @@ -1192,9 +1192,9 @@ if (tol <= 0.0) { if (nr > nc) - tol = nr * sigma.elem (0) * DBL_EPSILON; + tol = nr * sigma.elem (0) * std::numeric_limits::epsilon (); else - tol = nc * sigma.elem (0) * DBL_EPSILON; + tol = nc * sigma.elem (0) * std::numeric_limits::epsilon (); } while (r >= 0 && sigma.elem (r) < tol) diff -r aeba1adfd76b -r 61822c866ba1 liboctave/CollocWt.cc --- a/liboctave/CollocWt.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/CollocWt.cc Thu Aug 23 12:13:59 2012 -0400 @@ -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::epsilon ()) done = true; } root[i] = x; - x = x + sqrt (DBL_EPSILON); + x = x + sqrt (std::numeric_limits::epsilon ()); } // Add interpolation points at x = 0 and/or x = 1. diff -r aeba1adfd76b -r 61822c866ba1 liboctave/DASPK-opts.in --- a/liboctave/DASPK-opts.in Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/DASPK-opts.in Thu Aug 23 12:13:59 2012 -0400 @@ -32,13 +32,13 @@ SET_ARG_TYPE = "const $TYPE&" INIT_BODY $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = ::sqrt (DBL_EPSILON); + $OPTVAR(0) = ::sqrt (std::numeric_limits::epsilon ()); END_INIT_BODY SET_CODE void set_$OPT (double val) { $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); + $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits::epsilon ()); reset = true; } @@ -68,13 +68,13 @@ SET_ARG_TYPE = "const $TYPE&" INIT_BODY $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = ::sqrt (DBL_EPSILON); + $OPTVAR(0) = ::sqrt (std::numeric_limits::epsilon ()); END_INIT_BODY SET_CODE void set_$OPT (double val) { $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); + $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits::epsilon ()); reset = true; } @@ -172,7 +172,7 @@ $OPTVAR(1) = 6.0; $OPTVAR(2) = 5.0; $OPTVAR(3) = 0.0; - $OPTVAR(4) = ::pow (DBL_EPSILON, 2.0/3.0); + $OPTVAR(4) = ::pow (std::numeric_limits::epsilon (), 2.0/3.0); $OPTVAR(5) = 0.01; END_INIT_BODY SET_EXPR = "val" diff -r aeba1adfd76b -r 61822c866ba1 liboctave/DASRT-opts.in --- a/liboctave/DASRT-opts.in Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/DASRT-opts.in Thu Aug 23 12:13:59 2012 -0400 @@ -32,13 +32,13 @@ SET_ARG_TYPE = "const $TYPE&" INIT_BODY $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = ::sqrt (DBL_EPSILON); + $OPTVAR(0) = ::sqrt (std::numeric_limits::epsilon ()); END_INIT_BODY SET_CODE void set_$OPT (double val) { $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); + $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits::epsilon ()); reset = true; } @@ -68,13 +68,13 @@ SET_ARG_TYPE = "const $TYPE&" INIT_BODY $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = ::sqrt (DBL_EPSILON); + $OPTVAR(0) = ::sqrt (std::numeric_limits::epsilon ()); END_INIT_BODY SET_CODE void set_$OPT (double val) { $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); + $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits::epsilon ()); reset = true; } diff -r aeba1adfd76b -r 61822c866ba1 liboctave/DASSL-opts.in --- a/liboctave/DASSL-opts.in Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/DASSL-opts.in Thu Aug 23 12:13:59 2012 -0400 @@ -32,13 +32,13 @@ SET_ARG_TYPE = "const $TYPE&" INIT_BODY $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = ::sqrt (DBL_EPSILON); + $OPTVAR(0) = ::sqrt (std::numeric_limits::epsilon ()); END_INIT_BODY SET_CODE void set_$OPT (double val) { $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); + $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits::epsilon ()); reset = true; } @@ -68,13 +68,13 @@ SET_ARG_TYPE = "const $TYPE&" INIT_BODY $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = ::sqrt (DBL_EPSILON); + $OPTVAR(0) = ::sqrt (std::numeric_limits::epsilon ()); END_INIT_BODY SET_CODE void set_$OPT (double val) { $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); + $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits::epsilon ()); reset = true; } diff -r aeba1adfd76b -r 61822c866ba1 liboctave/LSODE-opts.in --- a/liboctave/LSODE-opts.in Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/LSODE-opts.in Thu Aug 23 12:13:59 2012 -0400 @@ -31,13 +31,13 @@ SET_ARG_TYPE = "const $TYPE&" INIT_BODY $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = ::sqrt (DBL_EPSILON); + $OPTVAR(0) = ::sqrt (std::numeric_limits::epsilon ()); END_INIT_BODY SET_CODE void set_$OPT (double val) { $OPTVAR.resize (dim_vector (1, 1)); - $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); + $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits::epsilon ()); reset = true; } @@ -63,8 +63,8 @@ END_DOC_ITEM TYPE = "double" - INIT_VALUE = "::sqrt (DBL_EPSILON)" - SET_EXPR = "(val > 0.0) ? val : ::sqrt (DBL_EPSILON)" + INIT_VALUE = "::sqrt (std::numeric_limits::epsilon ())" + SET_EXPR = "(val > 0.0) ? val : ::sqrt (std::numeric_limits::epsilon ())" END_OPTION OPTION diff -r aeba1adfd76b -r 61822c866ba1 liboctave/Quad-opts.in --- a/liboctave/Quad-opts.in Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/Quad-opts.in Thu Aug 23 12:13:59 2012 -0400 @@ -25,7 +25,7 @@ END_DOC_ITEM TYPE = "double" - INIT_VALUE = "::sqrt (DBL_EPSILON)" + INIT_VALUE = "::sqrt (std::numeric_limits::epsilon ())" SET_EXPR = "val" END_OPTION @@ -38,7 +38,7 @@ END_DOC_ITEM TYPE = "double" - INIT_VALUE = "::sqrt (DBL_EPSILON)" + INIT_VALUE = "::sqrt (std::numeric_limits::epsilon ())" SET_EXPR = "val" END_OPTION @@ -50,7 +50,7 @@ END_DOC_ITEM TYPE = "float" - INIT_VALUE = "::sqrt (FLT_EPSILON)" + INIT_VALUE = "::sqrt (std::numeric_limits::epsilon ())" SET_EXPR = "val" END_OPTION @@ -62,6 +62,6 @@ @w{@code{max (50*eps, 0.5e-28)}}. END_DOC_ITEM TYPE = "float" - INIT_VALUE = "::sqrt (FLT_EPSILON)" + INIT_VALUE = "::sqrt (std::numeric_limits::epsilon ())" SET_EXPR = "val" END_OPTION diff -r aeba1adfd76b -r 61822c866ba1 liboctave/Range.cc --- a/liboctave/Range.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/Range.cc Thu Aug 23 12:13:59 2012 -0400 @@ -456,7 +456,7 @@ } static inline bool -teq (double u, double v, double ct = 3.0 * DBL_EPSILON) +teq (double u, double v, double ct = 3.0 * std::numeric_limits::epsilon ()) { double tu = fabs (u); double tv = fabs (v); @@ -477,7 +477,7 @@ } else { - double ct = 3.0 * DBL_EPSILON; + double ct = 3.0 * std::numeric_limits::epsilon (); double tmp = tfloor ((rng_limit - rng_base + rng_inc) / rng_inc, ct); diff -r aeba1adfd76b -r 61822c866ba1 liboctave/dMatrix.cc --- a/liboctave/dMatrix.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/dMatrix.cc Thu Aug 23 12:13:59 2012 -0400 @@ -865,9 +865,9 @@ if (tol <= 0.0) { if (nr > nc) - tol = nr * sigma.elem (0) * DBL_EPSILON; + tol = nr * sigma.elem (0) * std::numeric_limits::epsilon (); else - tol = nc * sigma.elem (0) * DBL_EPSILON; + tol = nc * sigma.elem (0) * std::numeric_limits::epsilon (); } while (r >= 0 && sigma.elem (r) < tol) diff -r aeba1adfd76b -r 61822c866ba1 liboctave/eigs-base.cc --- a/liboctave/eigs-base.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/eigs-base.cc Thu Aug 23 12:13:59 2012 -0400 @@ -3672,7 +3672,8 @@ octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const Matrix& b, ColumnVector &permB, ColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3682,7 +3683,8 @@ octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const SparseMatrix& b, ColumnVector &permB, ColumnVector &resid, - std::ostream& os, double tol = DBL_EPSILON, + std::ostream& os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3692,7 +3694,8 @@ octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const Matrix& b, ColumnVector &permB, ColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3702,7 +3705,8 @@ octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const SparseMatrix& b, ColumnVector &permB, ColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3713,8 +3717,9 @@ octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, ColumnVector &resid, std::ostream &os, - double tol = DBL_EPSILON, bool rvec = false, - bool cholB = 0, int disp = 0, int maxit = 300); + double tol = std::numeric_limits::epsilon (), + bool rvec = false, bool cholB = 0, int disp = 0, + int maxit = 300); extern octave_idx_type EigsRealNonSymmetricMatrix (const Matrix& m, const std::string typ, @@ -3722,7 +3727,8 @@ octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const Matrix& b, ColumnVector &permB, ColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3733,7 +3739,8 @@ ComplexColumnVector &eig_val, const SparseMatrix& b, ColumnVector &permB, ColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3744,7 +3751,8 @@ ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const Matrix& b, ColumnVector &permB, ColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3756,7 +3764,8 @@ ComplexColumnVector &eig_val, const SparseMatrix& b, ColumnVector &permB, ColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3767,8 +3776,9 @@ octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, ColumnVector &resid, std::ostream& os, - double tol = DBL_EPSILON, bool rvec = false, - bool cholB = 0, int disp = 0, int maxit = 300); + double tol = std::numeric_limits::epsilon (), + bool rvec = false, bool cholB = 0, int disp = 0, + int maxit = 300); extern octave_idx_type EigsComplexNonSymmetricMatrix (const ComplexMatrix& m, const std::string typ, @@ -3777,7 +3787,8 @@ ComplexColumnVector &eig_val, const ComplexMatrix& b, ColumnVector &permB, ComplexColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3790,7 +3801,8 @@ const SparseComplexMatrix& b, ColumnVector &permB, ComplexColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3803,7 +3815,8 @@ const ComplexMatrix& b, ColumnVector &permB, ComplexColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3817,7 +3830,8 @@ const SparseComplexMatrix& b, ColumnVector &permB, ComplexColumnVector &resid, - std::ostream &os, double tol = DBL_EPSILON, + std::ostream &os, + double tol = std::numeric_limits::epsilon (), bool rvec = false, bool cholB = 0, int disp = 0, int maxit = 300); @@ -3828,8 +3842,9 @@ octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, ComplexColumnVector &resid, std::ostream& os, - double tol = DBL_EPSILON, bool rvec = false, - bool cholB = 0, int disp = 0, int maxit = 300); + double tol = std::numeric_limits::epsilon (), + bool rvec = false, bool cholB = 0, + int disp = 0, int maxit = 300); #endif #ifndef _MSC_VER diff -r aeba1adfd76b -r 61822c866ba1 liboctave/fCMatrix.cc --- a/liboctave/fCMatrix.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/fCMatrix.cc Thu Aug 23 12:13:59 2012 -0400 @@ -1194,9 +1194,9 @@ if (tol <= 0.0) { if (nr > nc) - tol = nr * sigma.elem (0) * DBL_EPSILON; + tol = nr * sigma.elem (0) * std::numeric_limits::epsilon (); else - tol = nc * sigma.elem (0) * DBL_EPSILON; + tol = nc * sigma.elem (0) * std::numeric_limits::epsilon (); } while (r >= 0 && sigma.elem (r) < tol) diff -r aeba1adfd76b -r 61822c866ba1 liboctave/fMatrix.cc --- a/liboctave/fMatrix.cc Thu Aug 23 10:09:41 2012 -0500 +++ b/liboctave/fMatrix.cc Thu Aug 23 12:13:59 2012 -0400 @@ -865,9 +865,9 @@ if (tol <= 0.0) { if (nr > nc) - tol = nr * sigma.elem (0) * DBL_EPSILON; + tol = nr * sigma.elem (0) * std::numeric_limits::epsilon (); else - tol = nc * sigma.elem (0) * DBL_EPSILON; + tol = nc * sigma.elem (0) * std::numeric_limits::epsilon (); } while (r >= 0 && sigma.elem (r) < tol)