-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8261366: Add discussion of IEEE 754 to BigDecimal #2868
Conversation
👋 Welcome back darcy! A progress list of the required criteria for merging this PR into |
Webrevs
|
* representable values. Most operations accept as input one or more | ||
* values of a given format and produce a result in the same format. | ||
* A {@code BigDecimal}'s {@linkplain scale() scale} is equivalent to | ||
* negating an IEEE 754 value's exponent. {@code BigDecimal} values to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to -> do
* by the precision of the {@code MathContext} argument. For example | ||
* in {@code BigDecimal}, if a nonzero three-digit number and a | ||
* nonzero four-digit number are multiplied together in the context of | ||
* a {@code MathContext} object has a precision of three, the result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has -> having
* used to round all starting values and intermediate operations. The | ||
* numerical values computed can differ if the exponent range of the | ||
* IEEE 754 format being approximated is exceeded since a {@code | ||
* MathContext} does not curtail the scale {@code BigDecimal} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the scale -> the scale of
Suggest using another word than curtail, whose meaning will not be immediately clear to non-native readers as it's not a technical term.
* IEEE 754 format being approximated is exceeded since a {@code | ||
* MathContext} does not curtail the scale {@code BigDecimal} | ||
* results. Operations that would generate a NaN or exact infinity, | ||
* such as dividing by zero, throw an {@code Arithmetic-Exception} in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arithmetic-Exception
-> ArithmeticException
Mailing list message from Joe Darcy on core-libs-dev: Thanks for the review Florent; will fix in the next push, -Joe On 3/8/2021 1:57 AM, Florent Guillaume wrote: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
@jddarcy This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 18 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate |
@jddarcy Since your change was applied there have been 18 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 14cfbda. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Informative update to BigDecimal and related classes to latest IEEE 754 terminology, including a discussion of the similarities and differences of BigDecimal and IEEE 754 decimal arithmetic.
Once the wording is finalized, I'll reflow any modified paragraphs and update the copyright years, etc.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2868/head:pull/2868
$ git checkout pull/2868