Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55560 - trunk/libs/spirit/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2009-08-12 18:48:00


Author: hkaiser
Date: 2009-08-12 18:48:00 EDT (Wed, 12 Aug 2009)
New Revision: 55560
URL: http://svn.boost.org/trac/boost/changeset/55560

Log:
Changed calculation of epsilon in qi/real.cpp test
Text files modified:
   trunk/libs/spirit/test/qi/real.cpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/libs/spirit/test/qi/real.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/real.cpp (original)
+++ trunk/libs/spirit/test/qi/real.cpp 2009-08-12 18:48:00 EDT (Wed, 12 Aug 2009)
@@ -100,7 +100,7 @@
 bool
 compare(T n, double expected)
 {
- T const eps = std::numeric_limits<T>::epsilon();
+ T const eps = std::pow(10.0, -std::numeric_limits<T>::digits10);
     T delta = n - expected;
     return (delta >= -eps) && (delta <= eps);
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk