Math.sumPrecise()
Limited availability
The Math.sumPrecise()
static method returns the sum of an iterable of numbers. It avoids the precision loss of intermediate partial sums, as found using reduce()
or a loop to add together an array of values.
Learning resources on MDN
Browser support
- Chrome ❌
- Chrome Android ❌
- Edge ❌
- Firefox 137 Released on 2025-04-01
- Firefox for Android 137 Released on 2025-04-01
- Safari ❌
- Safari on iOS ❌
Specifications
- Math.sumPrecise, from TC39 (Ecma International).
View web-platform-tests results for this feature - View the feature source file (dist) - Edit the feature - Report an issue about this feature