Tagged articles

Math.sumPrecise

2 articles · Page 1 of 1
JavaScript
JavaScript
Oct 22, 2026 · Frontend Development

ES2026 Finalized: No New Syntax, Seven Standard Library Additions That Cut Boilerplate

ECMAScript 2026 introduces seven standard library features — Math.sumPrecise for precise floating-point sums, Map.getOrInsert for atomic upserts, Uint8Array Base64/Hex conversion, Error.isError for cross-realm error checks, Iterator.concat for lazy iteration, Array.fromAsync, and JSON.parse source text access — eliminating common utility code, with support arriving in Chrome 137+, Node.js 24+, and Temporal deferred to ES2027.

Browser CompatibilityECMAScript 2026JavaScript
0 likes · 4 min read
ES2026 Finalized: No New Syntax, Seven Standard Library Additions That Cut Boilerplate
JavaScript
JavaScript
Oct 17, 2026 · Fundamentals

Stop Using reduce for Sums: JavaScript's Math.sumPrecise() Explained

This article explains how JavaScript's reduce method loses precision when summing large or many numbers due to floating-point rounding, introduces the new ES2026 Math.sumPrecise() method that avoids intermediate rounding errors, demonstrates its accuracy with examples like summing 1e20, 0.1, -1e20 and 1000 times 0.1, and notes current browser support.

ES2026IEEE 754JavaScript
0 likes · 6 min read
Stop Using reduce for Sums: JavaScript's Math.sumPrecise() Explained