@univerjs/engine-formula v0.1.17 • Docs
Function: stripErrorMargin()
function stripErrorMargin(num, precision): number
Tolerance for the results of accuracy issues to tolerate certain errors
Why 12? This is an empirical choice. Generally, choosing 12 can solve most of the 0001 and 0009 problems. e.g. floor(5,1.23) = 0.0800000000000001
Parameters
Parameter | Type | Default value |
---|---|---|
num | number | undefined |
precision | number | 12 |
Returns
number
Defined in
packages/engine-formula/src/engine/utils/math-kit.ts:195 (opens in a new tab)