Skip to main content

method Math.sumPrecise

#Math.sumPrecise(values: Iterable<number>): number

Returns the sum of the given values using a more precise algorithm than a naive +-based reduction, avoiding the floating-point rounding errors that accumulate when summing many numbers.

MDN Reference

Parameters #

#values: Iterable<number>

Return Type #

number

Did you find what you needed?

Privacy policy