RFR: 8378414: Add methods to test for representation equivalence
Chen Liang
liach at openjdk.org
Mon Feb 23 02:02:07 UTC 2026
On Mon, 23 Feb 2026 00:48:07 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> Floating-point values have a notion of representation equivalence distinct from the comparison done by ==. This notion of equivalence could have a method to provide the predicate directly, rather than relying on one of several expressions listed in the documentation ([JDK-8295391](https://bugs.openjdk.org/browse/JDK-8295391)).
This equivalence is already covered by their `equals(Object)` methods. I would assume they are declared as `equals(double, double)` etc. similar to how instance `Double::isInfinite()` and static `Double::isInfinite(double)` are declared.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29870#issuecomment-3942150565
More information about the core-libs-dev
mailing list