Re: RFR: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double [v2]
On Fri, 22 Apr 2022 16:34:46 GMT, Joe Darcy wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double > > src/java.base/share/classes/java/lang/Double.java line 231: > >> 229: * @since 1.6 >> 230: */ >> 231: public static final int MAX_EXPONENT = (1 << (SIZE - PRECISION - >> 1)) - 1; > > Please include the expected value as a comment; e.g. > > (1 << (SIZE - PRECISION - 1)) - 1; // 1023 Ready > src/java.base/share/classes/java/lang/Float.java line 128: > >> 126: * The number of bits in the significand of a {@code float} value. >> 127: * This is the parameter N in section {@jls 4.2.3} of >> 128: * The Java Language Specification. > > Please use "cite" rather than "em" tags for references to the JLS. Ready - PR: https://git.openjdk.java.net/jdk/pull/8362
Re: RFR: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double [v2]
On Fri, 22 Apr 2022 14:38:06 GMT, Raffaello Giulietti wrote: >> Add useful constants specified in IEEE 754. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double src/java.base/share/classes/java/lang/Double.java line 231: > 229: * @since 1.6 > 230: */ > 231: public static final int MAX_EXPONENT = (1 << (SIZE - PRECISION - 1)) > - 1; Please include the expected value as a comment; e.g. (1 << (SIZE - PRECISION - 1)) - 1; // 1023 src/java.base/share/classes/java/lang/Float.java line 128: > 126: * The number of bits in the significand of a {@code float} value. > 127: * This is the parameter N in section {@jls 4.2.3} of > 128: * The Java Language Specification. Please use "cite" rather than "em" tags for references to the JLS. - PR: https://git.openjdk.java.net/jdk/pull/8362
Re: RFR: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double [v2]
> Add useful constants specified in IEEE 754. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double - Changes: - all: https://git.openjdk.java.net/jdk/pull/8362/files - new: https://git.openjdk.java.net/jdk/pull/8362/files/830faf2b..80a6fe2e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8362&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8362&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8362.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8362/head:pull/8362 PR: https://git.openjdk.java.net/jdk/pull/8362