Skip to content

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

Merged
jessealama merged 3 commits intomainfrom
explicit-value
Apr 23, 2026
Merged

Use Number.p.toExponential for finite string values, Number for non-finite values#86
jessealama merged 3 commits intomainfrom
explicit-value

Conversation

@eemeli
Copy link
Copy Markdown
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
Copy Markdown

github-actions Bot commented Feb 27, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-04-23 16:44 UTC

Copy link
Copy Markdown
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.

Comment thread README.md Outdated
Comment thread README.md Outdated
eemeli and others added 3 commits April 23, 2026 17:06
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
@jessealama jessealama merged commit 97b0cb0 into main Apr 23, 2026
3 checks passed
@jessealama jessealama deleted the explicit-value branch April 23, 2026 16:44
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.

3 participants