# Tolerance for equality in GAMS/CPLEX

Is there an option in GAMS that sets the tolerance for declaring two real numbers to equal?

For example, how can I tell GAMS or GAMS/CPLEX that $$0.999100 = 0.99909$$?

• Welcome to OR.SE. To add @Mark L. Stone said, GAMS has an option to set decimals of numbers. You could try (E.g. option decimals = 4;). Jan 31, 2020 at 18:52

eprhs (real): feasibility tolerance

Feasibility tolerance. This specifies the degree to which a problem's basic variables may violate their bounds. This tolerance influences the selection of an optimal basis and can be reset to a higher value when a problem is having difficulty maintaining feasibility during optimization. You may also wish to lower this tolerance after finding an optimal solution if there is any doubt that the solution is truly optimal. If the feasibility tolerance is set too low, Cplex may falsely conclude that a problem is infeasible.

Range: [1e-009, 0.1]

Default: 1e-006

I believe this tolerance applies to assessing feasibility of bound, inequality, and equality constraints.