Skip to content

Function: cancel() ​

ts
function cancel(sum, magnitude): number;

Defined in: pwl.ts:77

The cancellation rule: a sum whose terms cancel to within the rounding error they carry is 0. magnitude is the sum of the terms' sizes. Applied to σ's coefficient, it decides whether a sum depends on σ: two claims whose σ parts cancel (a one-value domain's ascent 5σ + 3 and descent −5σ + 3, each off by a rounding) sum to a value that does not, rather than one with a slope of 1e-15 that solves σ ≈ 1e16. The terms are in one unit, so the rule is relative to them, and a small slope summed from small terms is kept.

Parameters ​

sum ​

number

magnitude ​

number

Returns ​

number