Index: src/Fragmentation/Summation/SetValues/SamplingGrid.cpp
===================================================================
--- src/Fragmentation/Summation/SetValues/SamplingGrid.cpp	(revision 57fda060b3ae2dde9f8b4af969eec2eab27bcf44)
+++ src/Fragmentation/Summation/SetValues/SamplingGrid.cpp	(revision ad6485c80071023d5f1098dfd5ae93502b4855ef)
@@ -55,4 +55,6 @@
 #include "LinearAlgebra/Vector.hpp"
 
+#define MYSAMPLINGGRIDEPSILON (1e2*std::numeric_limits<double>::epsilon())
+
 // static instances
 const double SamplingGrid::zeroOffset[NDIM] = { 0., 0., 0. };
@@ -313,9 +315,9 @@
   for (size_t index=0;index<NDIM;++index) {
     begin_window[index] = getNearestLowerGridPoint(_begin_window[index], index);
-    ASSERT( begin_window[index] >= begin[index],
+    ASSERT( (begin_window[index] - begin[index]) > -MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::setWindowSize() - window starts earlier than domain on "
         +toString(index)+"th component.");
     end_window[index] = getNearestHigherGridPoint(_end_window[index], index);
-    ASSERT( end_window[index] <= end[index],
+    ASSERT( (end_window[index] - end[index]) < MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::setWindowSize() - window ends later than domain on "
         +toString(index)+"th component.");
@@ -350,16 +352,16 @@
   for(size_t index=0;index < NDIM; ++index) {
     // check that we truly have to extend the window
-    ASSERT ( begin_window[index] >= _begin_window[index],
+    ASSERT ( (begin_window[index] - _begin_window[index]) > -MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::extendWindow() - component "+toString(index)+
         " of window start is greater than old value.");
-    ASSERT ( end_window[index] <= _end_window[index],
+    ASSERT ( (end_window[index] - _end_window[index]) < MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::extendWindow() - component "+toString(index)+
         " of window end is less than old value.");
 
     // check that we are still less than domain
-    ASSERT ( _begin_window[index] >= begin[index],
+    ASSERT ( (_begin_window[index] - begin[index]) > -MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::extendWindow() - component "+toString(index)+
         " of window start is less than domain start.");
-    ASSERT ( _end_window[index] <= end[index],
+    ASSERT ( (_end_window[index] - end[index]) < MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::extendWindow() - component "+toString(index)+
         " of window end is greater than domain end.");
@@ -388,16 +390,16 @@
   for(size_t index=0;index < NDIM; ++index) {
     // check that we truly have to shrink the window
-    ASSERT ( begin_window[index] <= _begin_window[index],
+    ASSERT ( (begin_window[index] - _begin_window[index]) > -MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::shrinkWindow() - component "+toString(index)+
         " of window start is less than old value.");
-    ASSERT ( end_window[index] >= _end_window[index],
+    ASSERT ( (end_window[index] - _end_window[index]) < MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::shrinkWindow() - component "+toString(index)+
         " of window end is greater than old value.");
 
     // check that we are still less than domain
-    ASSERT ( _begin_window[index] >= begin[index],
+    ASSERT ( (_begin_window[index] - begin[index]) > -MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::shrinkWindow() - component "+toString(index)+
         " of window start is less than domain start.");
-    ASSERT ( _end_window[index] <= end[index],
+    ASSERT ( (_end_window[index] - end[index]) < MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::shrinkWindow() - component "+toString(index)+
         " of window end is greater than domain end.");
@@ -485,5 +487,5 @@
     }
     // total is used as safe-guard against loss due to discrete conversion
-    ASSERT( (_wend[index] - _wbegin[index]) == _wlength[index],
+    ASSERT( fabs(_wend[index] - _wbegin[index] - _wlength[index]) < MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::getDiscreteWindowCopyIndices() - end - begin is not equal to length for "
         +toString(index)+"th component.");
@@ -573,8 +575,8 @@
 #ifndef NDEBUG
   for(size_t index=0;index<NDIM;++index) {
-    ASSERT( smaller_wbegin[index] >= larger_wbegin[index],
+    ASSERT( (smaller_wbegin[index] - larger_wbegin[index]) > -MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::addWindowOntoWindow() - given smaller window starts earlier than larger window in component "
         +toString(index)+".");
-    ASSERT( smaller_wend[index] <= larger_wend[index],
+    ASSERT( (smaller_wend[index] - larger_wend[index]) < MYSAMPLINGGRIDEPSILON,
         "SamplingGrid::addWindowOntoWindow() - given smaller window ends later than larger window in component "
         +toString(index)+".");
