From ca48be15a66ef85fbd3f2f9f2ff6a8d52164b688 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Wed, 26 Oct 2011 16:42:40 +0200
Subject: [PATCH] numeric_limits<double>::min() is positive!

Contrary to what one might expect, it is the smallest representable
*positive* number.

Using -max() works because by IEEE 754, floats are symmetric!
---
 src/mynonlinearity.hh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mynonlinearity.hh b/src/mynonlinearity.hh
index b0fb20d5..c73bd959 100644
--- a/src/mynonlinearity.hh
+++ b/src/mynonlinearity.hh
@@ -58,7 +58,7 @@ template <int dimension> class MyNonlinearity {
 
   void directionalDomain(const VectorType &, const VectorType &,
                          Interval<double> &dom) const {
-    dom[0] = std::numeric_limits<double>::min();
+    dom[0] = -std::numeric_limits<double>::max();
     dom[1] = std::numeric_limits<double>::max();
   }
 
-- 
GitLab