JavaScript's Math.sqrt will be required to be correctly rounded, and thus deterministic!

https://github.com/tc39/ecma262/pull/3345

In practice, all major implementations are already conforming, but it is nice to have the spec make this guarantee. Thanks to @michaelficarra for championing this change!

Normative: fully define Math.sqrt by michaelficarra · Pull Request #3345 · tc39/ecma262

This matches the behaviour that web engines today already display with the WebAssembly f64.sqrt instruction. /cc @sunfishcode

GitHub
@sunfish @michaelficarra Still no NaN canonicalization though, right?
@zwarich @sunfish Not exactly NaN canonicalisation, but we do have this: https://tc39.es/ecma262/#sec-numerictorawbytes
ECMAScript® 2025 Language Specification

Introduction This Ecma Standard defines the ECMAScript 2025 Language. It is the sixteenth edition of the ECMAScript Language Specification. Since publication of the first edition in 1997, ECMAScript has grown to be one of the world's most widely used general-purpose programming languages. It is