Skip to content

Use Number.p.toExponential for finite string values, Number for non-finite values#86

Open
eemeli wants to merge 3 commits intomainfrom
explicit-value
Open

Use Number.p.toExponential for finite string values, Number for non-finite values#86
eemeli wants to merge 3 commits intomainfrom
explicit-value

Conversation

@eemeli
Copy link
Member

@eemeli eemeli commented Feb 27, 2026

It would be be beneficial if the representation of an Amount's string value was well definied, and if it unambiguously retained its precision.

Furthermore, the changes in #81 now allow us to use other types than strings to represent values, which would be useful for non-finite values.

So let's use the same representation that we're already emitting from Number.p.toExponential for finite values, and Number for the non-finite ones (Infinity, -Infinity, NaN).

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://tc39.github.io/proposal-amount/pr-preview/pr-86/

Built to branch gh-pages at 2026-02-28 07:15 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Member

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent.

eemeli and others added 2 commits February 28, 2026 09:08
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants