From 2ff8d3db8bb4635a03156f4895e957a458cb38bd Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Tue, 13 Aug 2019 14:35:45 +0200 Subject: [PATCH] [433-update-yang-models] Moved to fabs to near double equal --- src/lib/cc/data.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/cc/data.cc b/src/lib/cc/data.cc index 0572e0ef77..d2e4c9a1c7 100644 --- a/src/lib/cc/data.cc +++ b/src/lib/cc/data.cc @@ -978,7 +978,7 @@ IntElement::equals(const Element& other) const { bool DoubleElement::equals(const Element& other) const { return (other.getType() == Element::real) && - (str() == other.str()); + (fabs(d - other.doubleValue()) < 1e-14); } bool -- 2.47.2