Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for precise results in Duration.p.total and ZonedDateTime.p.hoursInDay #3978

Closed
wants to merge 1 commit into from

Conversation

anba
Copy link
Contributor

@anba anba commented Jan 2, 2024

The existing tests didn't cover some edge cases where implementations have to compute the exact result of numerator / denominator, where at least one of numerator and denominator can't be exactly represented by an IEEE-754 double precision floating point value.

"precision-exact-mathematical-values-5.js" gets added in #3961, so the new tests from this commit start at "precision-exact-mathematical-values-6.js".

@anba anba requested a review from a team as a code owner January 2, 2024 13:00
….hoursInDay

The existing tests didn't cover some edge cases where implementations
have to compute the exact result of `numerator / denominator`, where at
least one of `numerator` and `denominator` can't be exactly represented
by an IEEE-754 double precision floating point value.

"precision-exact-mathematical-values-5.js" gets added in tc39#3961, so the
new tests from this commit start at "precision-exact-mathematical-values-6.js".
@anba anba force-pushed the temporal-fraction-precision branch from de53aca to 110203b Compare January 9, 2024 11:11
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Thanks as always for the number precision tests.

I've checked these against the state of the Temporal proposal including tc39/proposal-temporal#2727, which is not merged yet. So I'll close this PR and have absorbed it into #3961.

@ptomato ptomato closed this Jan 17, 2024
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 16, 2024
…al and ZonedDateTime.p.hoursInDay. r=dminor

Required to pass the tests from <tc39/test262#3978>.

Differential Revision: https://phabricator.services.mozilla.com/D198556
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Apr 17, 2024
…al and ZonedDateTime.p.hoursInDay. r=dminor

Required to pass the tests from <tc39/test262#3978>.

Differential Revision: https://phabricator.services.mozilla.com/D198556
@anba anba deleted the temporal-fraction-precision branch June 24, 2024 13:24
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