Understand numerical precision constraints in pivot operations
masterWhen working with or extending the solver's numerical logic, be aware that certain optimizations can cause numerical drift and break Mixed Integer Programming (MIP) branching.
Do not attempt the following optimizations:
- Using multiplication instead of division for pivot row normalization: You must use division (
matrix[row] / quotient) to maintain precision. Using multiplication by an inverse (matrix[row] * invQuotient) introduces small errors that affect branching decisions. - Removing zero checks in pivot loops: Even if a column is expected to be non-zero, keeping explicit zero checks (e.g.,
if (row[pivotColumnIndex] !== 0)) prevents the accumulation of floating-point errors that compound during MIP branching.