Re: RFR: JDK-8257086: Clarify differences between {Float, Double}.equals and == [v3]
On Fri, 29 Jan 2021 17:31:09 GMT, Joe Darcy wrote: >> Updates to the specifications of Double.{equals, compareTo} to explain more >> explicitly why the obvious wrappers around "==" and "<"/"==" are not >> sufficient for floating-point values. >> >> Once the wording is worked out, I'll replicate it for the analogous methods >> on Float. > > Joe Darcy has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains six additional commits since > the last revision: > > - Merge branch 'master' into JDK-8257086 > - Update reworked wording from @smarks. > - Merge branch 'master' into JDK-8257086 > - Merge branch 'master' into JDK-8257086 > - Fix whitespace > - Initial work for JDK-8257086. Overall good! Just some whitespace errors and a couple typos as noted. src/java.base/share/classes/java/lang/Double.java line 117: > 115: * > 116: * To provide the appropriate semantics for {@code equals} and {@code > 117: * compareTo} methods, those methods cannot simply to wrappers around I think this should be "cannot simply be wrappers". - Marked as reviewed by smarks (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1699
Re: RFR: JDK-8257086: Clarify differences between {Float, Double}.equals and == [v3]
> Updates to the specifications of Double.{equals, compareTo} to explain more > explicitly why the obvious wrappers around "==" and "<"/"==" are not > sufficient for floating-point values. > > Once the wording is worked out, I'll replicate it for the analogous methods > on Float. Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: - Merge branch 'master' into JDK-8257086 - Update reworked wording from @smarks. - Merge branch 'master' into JDK-8257086 - Merge branch 'master' into JDK-8257086 - Fix whitespace - Initial work for JDK-8257086. - Changes: - all: https://git.openjdk.java.net/jdk/pull/1699/files - new: https://git.openjdk.java.net/jdk/pull/1699/files/308b387d..9d80e279 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=1699=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk=1699=01-02 Stats: 61247 lines in 1475 files changed: 22192 ins; 24174 del; 14881 mod Patch: https://git.openjdk.java.net/jdk/pull/1699.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1699/head:pull/1699 PR: https://git.openjdk.java.net/jdk/pull/1699