Skip to content

Editorial: fix the distance comparison in the toExponential note - #4056

Open
bakkot wants to merge 1 commit into
tc39:mainfrom
bakkot:fix-toexponential-note
Open

bakkot wants to merge 1 commit into
tc39:mainfrom
bakkot:fix-toexponential-note

Conversation

@bakkot

@bakkot bakkot commented Oct 30, 2026

Copy link
Copy Markdown
Member

Cherry-pick of the commit from #4008 by @JinDX.

The current text requires candidates to be such that "𝔽(intSignificand × 10exponent - ff) is [emphasis added] 𝔽(number)", but then says that you should choose between multiple candidates by taking the one such that "𝔽(intSignificand × 10exponent - ff) is closest to 𝔽(number)". That doesn't make sense because by definition all candidates make that relation have distance exactly zero.

I introduced this in #2450, whoops.

@github-actions

Copy link
Copy Markdown

The rendered spec preview for this PR is available as a single page at https://tc39.es/ecma262/pr/4056 and as multiple pages at https://tc39.es/ecma262/pr/4056/multipage .

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants