This error usually appears when a numeric calculation produces -Infinity and that value is passed into setValue or setSublistValue.
Error
Value -Infinity outside of valid min/max range for field custcol_myfield
Why It Happens
In some execution paths, a value that appears to be null can resolve to -Infinity before setValue or setSublistValue runs.
Resolution
Validate numeric values before writing them to the record:
if (Number.isFinite(myValue)) {
// Set value only when numeric and finite.
}