Skip to content

Commit 750a62d

Browse files
authored
Merge pull request #2792 from mgreter/bugfix/compare-doubles-epsilon
Fix number comparison for floats/doubles by calculations beyond 1e-10.
2 parents 7700049 + 7223f84 commit 750a62d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ast.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Sass {
3838

3939
// ToDo: should this really be hardcoded
4040
// Note: most methods follow precision option
41-
const double NUMBER_EPSILON = 0.00000000000001;
41+
const double NUMBER_EPSILON = 1e-12;
4242

4343
// macro to test if numbers are equal within a small error margin
4444
#define NEAR_EQUAL(lhs, rhs) std::fabs(lhs - rhs) < NUMBER_EPSILON

0 commit comments

Comments
 (0)