Skip to content

Commit 788fca1

Browse files
committed
rcx: Fix double comparison.
Signed-off-by: Christian Costa <[email protected]>
1 parent 814048c commit 788fca1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rcx/src/extBenchDB.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: BSD-3-Clause
22
// Copyright (c) 2019-2025, The OpenROAD Authors
33

4+
#include <cfloat>
45
#include <map>
56
#include <vector>
67

@@ -496,7 +497,7 @@ uint extRCModel::benchDB_WS(extMainOptions* opt, extMeasure* measure)
496497
double s = pitch * ii;
497498
double s1 = s - minWidth;
498499

499-
if (spacing != s1) {
500+
if (std::fabs(spacing - s1) > DBL_EPSILON) {
500501
spaceTable->add(s1);
501502
}
502503
spaceTable->add(s);

0 commit comments

Comments
 (0)