Re: RFR: 8288021: Add hard test cases to jdk.internal.math.DoubleToDecimalChecker

2022-06-14 Thread Raffaello Giulietti
On Wed, 8 Jun 2022 13:12:09 GMT, Raffaello Giulietti wrote: > These 19'545 doubles were generated on purpose by Paul Zimmermann of INRIA as > hard test cases. Many of the test cases failed before [PR3402](https://github.com/openjdk/jdk/pull/3402), so it's worth having them in the co

Integrated: 8288173: JDK-8202449 fix causes conformance test failure : api/java_util/Random/RandomGenerator/NextFloat.html

2022-06-10 Thread Raffaello Giulietti
On Fri, 10 Jun 2022 08:36:57 GMT, Raffaello Giulietti wrote: > This fixes a bug introduced with JDK-8202449. This pull request has now been integrated. Changeset: da2339cf Author: Raffaello Giulietti Committer: Brian Burkhalter URL: https://git.openjdk.org/jdk/com

Re: RFR: 8288173: JDK-8202449 fix causes conformance test failure : api/java_util/Random/RandomGenerator/NextFloat.html

2022-06-10 Thread Raffaello Giulietti
On Fri, 10 Jun 2022 08:36:57 GMT, Raffaello Giulietti wrote: > This fixes a bug introduced with JDK-8202449. The fix reverts an inadvertent "correction" sneaked into JDK-8202449, restoring previous (correct) behavior. - PR: https://git.openjdk.org/jdk/pull/9120

Re: RFR: JDK-8288227: Refactor annotation implementation to use pattern matching for instanceof

2022-06-10 Thread Raffaello Giulietti
On Fri, 10 Jun 2022 16:15:36 GMT, Joe Darcy wrote: > There are many instanceof checks in the sun.reflection.annotation code; these > would be improved by using pattern matching for instanceof. Seems clean - PR: https://git.openjdk.org/jdk/pull/9129

RFR: 8288173: JDK-8202449 fix causes conformance test failure : api/java_util/Random/RandomGenerator/NextFloat.html

2022-06-10 Thread Raffaello Giulietti
This fixes a bug introduced with JDK-8202449. - Commit messages: - 8288173: JDK-8202449 fix causes conformance test failure Changes: https://git.openjdk.org/jdk/pull/9120/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=9120=00 Issue:

Integrated: 8202449: overflow handling in Random.doubles

2022-06-08 Thread Raffaello Giulietti
On Thu, 19 May 2022 15:54:06 GMT, Raffaello Giulietti wrote: > Extend the range of Random.doubles(double, double) and similar methods. This pull request has now been integrated. Changeset: c8cff1bd Author: Raffaello Giulietti Committer: Joe Darcy URL: https://git.openjdk.java.

Integrated: 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str)

2022-06-08 Thread Raffaello Giulietti
On Thu, 26 May 2022 18:02:14 GMT, Raffaello Giulietti wrote: > BigDecimal(String) currently fails to accept some strings produced by > BigDecimal.toString(). This PR removes this limitation. This pull request has now been integrated. Changeset: c15e10fb Author:Raffaello Giu

RFR: 8288021: Add hard test cases to jdk.internal.math.DoubleToDecimalChecker

2022-06-08 Thread Raffaello Giulietti
These 19'545 doubles were generated on purpose by Paul Zimmermann of INRIA as hard test cases. - Commit messages: - 8288021: Add hard test cases to jdk.internal.math.DoubleToDecimalChecker Changes: https://git.openjdk.java.net/jdk/pull/9084/files Webrev:

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v11]

2022-06-07 Thread Raffaello Giulietti
18:35, LifeIsStrange wrote: On Mon, 9 May 2022 12:50:31 GMT, Raffaello Giulietti wrote: Marked as reviewed by limck...@github.com (no known OpenJDK username). @limck599 While we at OpenJDK appreciate constructive reviews from GitHub users not registered in the [census](https

Re: RFR: 8202449: overflow handling in Random.doubles [v3]

2022-06-07 Thread Raffaello Giulietti
On Tue, 24 May 2022 12:58:45 GMT, Raffaello Giulietti wrote: >> Extend the range of Random.doubles(double, double) and similar methods. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > 82024

Re: RFR: 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str) [v2]

2022-06-07 Thread Raffaello Giulietti
On Fri, 27 May 2022 22:59:47 GMT, Raffaello Giulietti wrote: >> BigDecimal(String) currently fails to accept some strings produced by >> BigDecimal.toString(). This PR removes this limitation. > > Raffaello Giulietti has updated the pull request incrementally with one &

Re: RFR: 8273346: Expand library mappings to IEEE 754 operations [v4]

2022-06-07 Thread Raffaello Giulietti
On Mon, 6 Jun 2022 22:24:03 GMT, Joe Darcy wrote: >> Generally add apiNote's to map from Java library methods to particular IEEE >> 754 operations. For now, I only added such notes to java.lang.Math and not >> java.lang.StrictMath. > > Joe Darcy has updated the pull request incrementally with

Re: Questions about Float.toString(float)

2022-06-06 Thread Raffaello Giulietti
On 2022-06-05 09:59, LP wrote: Hi, (1) float f = Float.intBitsToFloat(260046848); JDK 17: Float.toString(f) -> 1.26217745E-29 master: Float.toString(f) -> 1.2621775E-29 BigDecimal.valueOf(Float.intBitsToFloat(260046847)) -> 1.2621773731219804E-29

RFR: [CSR] 8287376: BigDecimal(String) must allow a larger range for the exponent

2022-06-03 Thread Raffaello Giulietti
Hello, anybody willing to review this small CSR? https://bugs.openjdk.java.net/browse/JDK-8287376 Thanks Raffaello

Re: RFR: 8273346: Expand library mappings to IEEE 754 operations [v2]

2022-06-02 Thread Raffaello Giulietti
On Wed, 1 Jun 2022 08:39:44 GMT, Raffaello Giulietti wrote: > not just ties Plz. disregard this 3 words - PR: https://git.openjdk.java.net/jdk/pull/8876

Integrated: 4511638: Double.toString(double) sometimes produces incorrect results

2022-06-01 Thread Raffaello Giulietti
On Thu, 8 Apr 2021 21:12:21 GMT, Raffaello Giulietti wrote: > Hello, > > here's a PR for a patch submitted on March 2020 > [1](https://cr.openjdk.java.net/~bpb/4511638/webrev.04/) when Mercurial was a > thing. > > The patch has been edited to adhere to OpenJDK c

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v15]

2022-06-01 Thread Raffaello Giulietti
code proper has changed, except > for the addition of redundant but clarifying parentheses in some expressions. > > > Greetings > Raffaello Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 4511638: Dou

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v14]

2022-06-01 Thread Raffaello Giulietti
On Tue, 31 May 2022 22:11:54 GMT, Brian Burkhalter wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 4511638: Double.toString(double) sometimes produces incorrect results > > s

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v14]

2022-06-01 Thread Raffaello Giulietti
On Tue, 31 May 2022 21:55:16 GMT, Brian Burkhalter wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 4511638: Double.toString(double) sometimes produces incorrect results > > s

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v14]

2022-06-01 Thread Raffaello Giulietti
On Wed, 1 Jun 2022 09:21:43 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/jdk/internal/math/DoubleToDecimal.java line 118: >> >>> 116: private int index; >>> 117: >>> 118: private DoubleToDecimal() { >> >> Maybe

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v14]

2022-06-01 Thread Raffaello Giulietti
On Tue, 31 May 2022 21:57:44 GMT, Brian Burkhalter wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 4511638: Double.toString(double) sometimes produces incorrect results > > s

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v14]

2022-06-01 Thread Raffaello Giulietti
On Tue, 31 May 2022 21:35:08 GMT, Brian Burkhalter wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 4511638: Double.toString(double) sometimes produces incorrect results > > s

Re: RFR: 8273346: Expand library mappings to IEEE 754 operations [v2]

2022-06-01 Thread Raffaello Giulietti
On Wed, 1 Jun 2022 02:05:40 GMT, Joe Darcy wrote: >> Generally add apiNote's to map from Java library methods to particular IEEE >> 754 operations. For now, I only added such notes to java.lang.Math and not >> java.lang.StrictMath. > > Joe Darcy has updated the pull request with a new target

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v14]

2022-05-31 Thread Raffaello Giulietti
code proper has changed, except > for the addition of redundant but clarifying parentheses in some expressions. > > > Greetings > Raffaello Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 4511638: Dou

Re: RFR: 8287544: Replace uses of StringBuffer with StringBuilder in java.naming

2022-05-31 Thread Raffaello Giulietti
On Sun, 29 May 2022 21:57:46 GMT, Andrey Turbanov wrote: > StringBuffer is a legacy synchronized class. StringBuilder is a direct > replacement to StringBuffer which generally have better performance. > There are some code that still uses StringBuffer in java.naming which could > be migrated

Re: RFR: 8287497: Use String.contains() instead of String.indexOf() in java.naming

2022-05-30 Thread Raffaello Giulietti
On Sun, 29 May 2022 14:00:20 GMT, Andrey Turbanov wrote: > `String.contains` was introduced in Java 5. > Some code in java.naming still uses old approach with `String.indexOf` to > check if String contains specified substring. > I propose to migrate such usages. Makes code shorter and easier to

Re: RFR: 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str) [v2]

2022-05-27 Thread Raffaello Giulietti
On Fri, 27 May 2022 20:16:12 GMT, Joe Darcy wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8233760: Result of BigDecimal.toString throws overflow exception on new >> BigDecim

Re: RFR: 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str) [v2]

2022-05-27 Thread Raffaello Giulietti
> BigDecimal(String) currently fails to accept some strings produced by > BigDecimal.toString(). This PR removes this limitation. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8233760: Result of BigDecimal.toString

RFR: [CSR] 8287376: BigDecimal(String) must allow a larger range for the exponent

2022-05-26 Thread Raffaello Giulietti
Currently, BigDecimal(String) requires the exponent part to lie in the int range. This CSR [1] removes this limitation, as it otherwise precludes constructing an instance from a string generated by BigDecimal.toString(). Greetings Raffaello [1]

Re: RFR: 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str)

2022-05-26 Thread Raffaello Giulietti
On Thu, 26 May 2022 18:02:14 GMT, Raffaello Giulietti wrote: > BigDecimal(String) currently fails to accept some strings produced by > BigDecimal.toString(). This PR removes this limitation. This happens because the constructor currently only accepts exponents in the `int` range

RFR: 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str)

2022-05-26 Thread Raffaello Giulietti
BigDecimal(String) currently fails to accept some strings produced by BigDecimal.toString(). This PR removes this limitation. - Commit messages: - 8233760: Result of BigDecimal.toString throws overflow exception on new BigDecimal(str) Changes:

Re: RFR: [CSR] 8287026: Changes related to overflow handling in Random.doubles

2022-05-25 Thread Raffaello Giulietti
Sorry, it's the other way round! To bring the spec in sync with the extended behavior of the PR [2] From: core-libs-dev on behalf of Raffaello Giulietti Date: Wednesday, 25 May 2022 at 18:57 To: core-libs-dev@openjdk.java.net Subject: RFR: [CSR] 8287026: Changes related to overflow handling

RFR: [CSR] 8287026: Changes related to overflow handling in Random.doubles

2022-05-25 Thread Raffaello Giulietti
Please review this CSR [1], whose aim is to bring the extended behavior of the PR [2] in sync with the spec. Greetings Raffaello [1] https://bugs.openjdk.java.net/browse/JDK-8287026 [2] https://git.openjdk.java.net/jdk/pull/8791

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts

2022-05-25 Thread Raffaello Giulietti
Brian Goetz Date: Wednesday, 25 May 2022 at 17:18 To: Raffaello Giulietti , core-libs-dev@openjdk.java.net Subject: Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts Another way to evaluate answers here is: are we inventing new relations, or merely clarifying ol

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts

2022-05-25 Thread Raffaello Giulietti
” and “Evolving past reference type patterns” in the amber-spec-experts mailing list of April 2022 don’t even mention the mixed integral/floating-point case. Greetings Raffaello From: core-libs-dev on behalf of Brian Goetz Date: Tuesday, 24 May 2022 at 00:09 To: Raffaello Giulietti , core

Re: RFR: 8202449: overflow handling in Random.doubles [v3]

2022-05-25 Thread Raffaello Giulietti
On Tue, 24 May 2022 12:58:45 GMT, Raffaello Giulietti wrote: >> Extend the range of Random.doubles(double, double) and similar methods. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > 82024

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts [v6]

2022-05-25 Thread Raffaello Giulietti
> Add a family of "safe" cast methods. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8279986: methods Math::asXExact for safely checked primitive casts - Changes: - all: https://git.openjdk.java

Re: RFR: 8273346: Expand library mappings to IEEE 754 operations

2022-05-25 Thread Raffaello Giulietti
On Wed, 25 May 2022 00:19:41 GMT, Joe Darcy wrote: > Generally add apiNote's to map from Java library methods to particular IEEE > 754 operations. For now, I only added such notes to java.lang.Math and not > java.lang.StrictMath. src/java.base/share/classes/java/lang/Math.java line 771: >

Re: RFR: 8202449: overflow handling in Random.doubles [v3]

2022-05-24 Thread Raffaello Giulietti
> Extend the range of Random.doubles(double, double) and similar methods. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8202449: overflow handling in Random.doubles - Changes: - all: ht

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts [v5]

2022-05-23 Thread Raffaello Giulietti
> Add a family of "safe" cast methods. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8279986: methods Math::asXExact for safely checked primitive casts - Changes: - all: https://git.openjdk.java

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts [v4]

2022-05-23 Thread Raffaello Giulietti
> Add a family of "safe" cast methods. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8279986: methods Math::asXExact for safely checked primitive casts - Changes: - all: https://git.openjdk.java

Re: RFR: 8284493: Fix rounding error in computeNextExponential

2022-05-23 Thread Raffaello Giulietti
On Sun, 22 May 2022 20:19:38 GMT, Andrey Turbanov wrote: >> Repeatedly adding DoubleZigguratTables.exponentialX0 to extra causes a >> rounding error to accumulate at the tail of the distribution (probably >> starting around 2*exponentialX0 == 0x1.e46eff20739afp3 ~ 15.1); this fixes >> that by

Re: RFR: 8202449: overflow handling in Random.doubles [v2]

2022-05-19 Thread Raffaello Giulietti
> Extend the range of Random.doubles(double, double) and similar methods. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8202449: overflow handling in Random.doubles - Changes: - all: ht

RFR: 8202449: overflow handling in Random.doubles

2022-05-19 Thread Raffaello Giulietti
Extend the range of Random.doubles(double, double) and similar methods. - Commit messages: - 8202449: overflow handling in Random.doubles Changes: https://git.openjdk.java.net/jdk/pull/8791/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8791=00 Issue:

Integrated: 8286810: Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Consts

2022-05-17 Thread Raffaello Giulietti
On Mon, 16 May 2022 14:48:43 GMT, Raffaello Giulietti wrote: > Please review these simple changes in jdk.internal.math.[Double|Float]Consts This pull request has now been integrated. Changeset: ea713c37 Author: Raffaello Giulietti Committer: Joe Darcy URL: ht

Re: RFR: 8213045: Add BigDecimal.TWO [v2]

2022-05-17 Thread Raffaello Giulietti
On Mon, 16 May 2022 22:34:21 GMT, Brian Burkhalter wrote: >> Add constant `java.math.BigDecimal.TWO`. > > Brian Burkhalter has refreshed the contents of this pull request, and > previous commits have been removed. The incremental views will show > differences compared to the previous content

Re: RFR: 8286810: Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Consts [v3]

2022-05-16 Thread Raffaello Giulietti
> Please review these simple changes in jdk.internal.math.[Double|Float]Consts Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8286810: Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Con

Re: RFR: 8286810: Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Consts [v2]

2022-05-16 Thread Raffaello Giulietti
On Mon, 16 May 2022 15:54:25 GMT, Raffaello Giulietti wrote: >> Please review these simple changes in jdk.internal.math.[Double|Float]Consts > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > >

Re: RFR: 8286810: Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Consts

2022-05-16 Thread Raffaello Giulietti
On Mon, 16 May 2022 14:48:43 GMT, Raffaello Giulietti wrote: > Please review these simple changes in jdk.internal.math.[Double|Float]Consts Adjusted - PR: https://git.openjdk.java.net/jdk/pull/8729

Re: RFR: 8286810: Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Consts [v2]

2022-05-16 Thread Raffaello Giulietti
> Please review these simple changes in jdk.internal.math.[Double|Float]Consts Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8286810: Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Con

RFR: 8286810: Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Consts

2022-05-16 Thread Raffaello Giulietti
Please review these simple changes in jdk.internal.math.[Double|Float]Consts - Commit messages: - 8286810: Use public [Double|Float].PRECISION fields in jdk.internal.math.[Double|Float]Consts Changes: https://git.openjdk.java.net/jdk/pull/8729/files Webrev:

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v13]

2022-05-13 Thread Raffaello Giulietti
code proper has changed, except > for the addition of redundant but clarifying parentheses in some expressions. > > > Greetings > Raffaello Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 4511638: Dou

Re: RFR: 8286200: SequenceInputStream::read(b, off, 0) returns -1 at EOF [v3]

2022-05-12 Thread Raffaello Giulietti
On Thu, 12 May 2022 16:01:50 GMT, Brian Burkhalter wrote: >> Modify the specification of `SequenceInputStream.read(byte[],int,int)` to >> indicate that `-1` is returned at the EOF of the last stream even if `len` >> is zero. > > Brian Burkhalter has updated the pull request incrementally with

Re: RFR: 8286200: SequenceInputStream::read(b, off, 0) returns -1 at EOF [v2]

2022-05-12 Thread Raffaello Giulietti
On Thu, 12 May 2022 15:48:47 GMT, Brian Burkhalter wrote: >> Modify the specification of `SequenceInputStream.read(byte[],int,int)` to >> indicate that `-1` is returned at the EOF of the last stream even if `len` >> is zero. > > Brian Burkhalter has updated the pull request incrementally with

Re: RFR: 8286200: SequenceInputStream::read(b, off, 0) returns -1 at EOF

2022-05-12 Thread Raffaello Giulietti
On Wed, 11 May 2022 20:47:52 GMT, Brian Burkhalter wrote: > Modify the specification of `SequenceInputStream.read(byte[],int,int)` to > indicate that `-1` is returned at the EOF of the last stream even if `len` is > zero. Also, in the current implementation, when the end of the last contained

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v12]

2022-05-11 Thread Raffaello Giulietti
code proper has changed, except > for the addition of redundant but clarifying parentheses in some expressions. > > > Greetings > Raffaello Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 4511638: Dou

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v11]

2022-05-11 Thread Raffaello Giulietti
On Tue, 10 May 2022 03:22:01 GMT, Joe Darcy wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 4511638: Double.toString(double) sometimes produces incorrect results > > src/jav

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v11]

2022-05-10 Thread Raffaello Giulietti
On Tue, 10 May 2022 03:21:21 GMT, Joe Darcy wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 4511638: Double.toString(double) sometimes produces incorrect results > > src/jav

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts [v3]

2022-05-10 Thread Raffaello Giulietti
> Add a family of "safe" cast methods. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8279986: methods Math::asXExact for safely checked primitive casts - Changes: - all: https://git.openjdk.java

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts [v2]

2022-05-10 Thread Raffaello Giulietti
On Tue, 10 May 2022 04:42:19 GMT, Joe Darcy wrote: >> Raffaello Giulietti 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 f

Integrated: 8274517: java/util/DoubleStreamSums/CompensatedSums.java fails with expected [true] but found [false]

2022-05-09 Thread Raffaello Giulietti
On Tue, 19 Apr 2022 08:40:51 GMT, Raffaello Giulietti wrote: > Please review these small changes to address intermittent failures, as of > JDK-8274517. > > - Usage of jdk.test.lib.RandomFactory for reproducible random generation. > - Slightly less restrictive

Re: RFR: 8274517: java/util/DoubleStreamSums/CompensatedSums.java fails with expected [true] but found [false] [v2]

2022-05-09 Thread Raffaello Giulietti
On Mon, 9 May 2022 09:25:15 GMT, Raffaello Giulietti wrote: >> Please review these small changes to address intermittent failures, as of >> JDK-8274517. >> >> - Usage of jdk.test.lib.RandomFactory for reproducible random generation. >> - Slightly le

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v11]

2022-05-09 Thread Raffaello Giulietti
On Mon, 9 May 2022 12:34:20 GMT, limck599 wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 4511638: Double.toString(double) sometimes produces incorrect results > > Marked as r

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v10]

2022-05-09 Thread Raffaello Giulietti
On Mon, 9 May 2022 09:26:20 GMT, Raffaello Giulietti wrote: >> Hello, >> >> here's a PR for a patch submitted on March 2020 >> [1](https://cr.openjdk.java.net/~bpb/4511638/webrev.04/) when Mercurial was >> a thing. >> >> The patch has been edited t

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v11]

2022-05-09 Thread Raffaello Giulietti
code proper has changed, except > for the addition of redundant but clarifying parentheses in some expressions. > > > Greetings > Raffaello Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 4511638: Dou

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts [v2]

2022-05-09 Thread Raffaello Giulietti
On Mon, 9 May 2022 09:26:58 GMT, Raffaello Giulietti wrote: >> Add a family of "safe" cast methods. > > Raffaello Giulietti has updated the pull request with a new target base due > to a merge or a rebase. The incremental webrev excludes the unrelated changes > br

Re: RFR: 8274517: java/util/DoubleStreamSums/CompensatedSums.java fails with expected [true] but found [false] [v2]

2022-05-09 Thread Raffaello Giulietti
On Mon, 9 May 2022 09:25:15 GMT, Raffaello Giulietti wrote: >> Please review these small changes to address intermittent failures, as of >> JDK-8274517. >> >> - Usage of jdk.test.lib.RandomFactory for reproducible random generation. >> - Slightly le

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v10]

2022-05-09 Thread Raffaello Giulietti
On Mon, 9 May 2022 09:26:20 GMT, Raffaello Giulietti wrote: >> Hello, >> >> here's a PR for a patch submitted on March 2020 >> [1](https://cr.openjdk.java.net/~bpb/4511638/webrev.04/) when Mercurial was >> a thing. >> >> The patch has been edited t

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts [v2]

2022-05-09 Thread Raffaello Giulietti
> Add a family of "safe" cast methods. Raffaello Giulietti 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 four additional commits s

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v10]

2022-05-09 Thread Raffaello Giulietti
code proper has changed, except > for the addition of redundant but clarifying parentheses in some expressions. > > > Greetings > Raffaello Raffaello Giulietti has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commi

Re: RFR: 8274517: java/util/DoubleStreamSums/CompensatedSums.java fails with expected [true] but found [false] [v2]

2022-05-09 Thread Raffaello Giulietti
re is still an inherent variability due to the use of parallel streams, > though. As double addition is not perfectly associative, even a fully known > sequence of doubles may lead to slightly different results with > parallelization. Raffaello Giulietti has updated the pull request wi

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v9]

2022-05-06 Thread Raffaello Giulietti
On Fri, 6 May 2022 08:40:40 GMT, Raffaello Giulietti wrote: >> Hello, >> >> here's a PR for a patch submitted on March 2020 >> [1](https://cr.openjdk.java.net/~bpb/4511638/webrev.04/) when Mercurial was >> a thing. >> >> The patch has been edited t

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v9]

2022-05-06 Thread Raffaello Giulietti
code proper has changed, except > for the addition of redundant but clarifying parentheses in some expressions. > > > Greetings > Raffaello Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 4511638: Dou

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v8]

2022-05-06 Thread Raffaello Giulietti
code proper has changed, except > for the addition of redundant but clarifying parentheses in some expressions. > > > Greetings > Raffaello Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 4511638: Dou

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v7]

2022-05-06 Thread Raffaello Giulietti
code proper has changed, except > for the addition of redundant but clarifying parentheses in some expressions. > > > Greetings > Raffaello Raffaello Giulietti has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commi

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts

2022-05-05 Thread Raffaello Giulietti
On Thu, 5 May 2022 15:07:32 GMT, Michael Hixson wrote: > Rationale: It loses information. It truncates the sign, so the value can't be > round-tripped. I think it would be the only lossy transformation permitted by > the to*Exact methods? Right. - PR:

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts

2022-05-05 Thread Raffaello Giulietti
On Thu, 5 May 2022 10:11:05 GMT, Raffaello Giulietti wrote: > Add a family of "safe" cast methods. The JLS specifies that the cast (officially, "narrowing primitive conversion") (long)-0.0 returns 0L. As these methods are meant to be safer casts, I think we should fol

Re: RFR: 8274517: java/util/DoubleStreamSums/CompensatedSums.java fails with expected [true] but found [false]

2022-05-05 Thread Raffaello Giulietti
On Tue, 19 Apr 2022 08:40:51 GMT, Raffaello Giulietti wrote: > Please review these small changes to address intermittent failures, as of > JDK-8274517. > > - Usage of jdk.test.lib.RandomFactory for reproducible random generation. > - Slightly less restrictive

Re: RFR: 8279986: methods Math::asXExact for safely checked primitive casts

2022-05-05 Thread Raffaello Giulietti
On Thu, 5 May 2022 10:11:05 GMT, Raffaello Giulietti wrote: > Add a family of "safe" cast methods. For an in-depth rationale, please refer to the issue (Enhancement). Note that the method names are, in fact, of the to*Exact rather than of the as*Exact form ---

RFR: 8279986: methods Math::asXExact for safely checked primitive casts

2022-05-05 Thread Raffaello Giulietti
Add a family of "safe" cast methods. - Commit messages: - 8279986: methods Math::asXExact for safely checked primitive casts - 8279986: methods Math::asXExact for safely checked primitive casts - 8279986: methods Math::asXExact for safely checked primitive casts Changes:

Re: RFR: JDK-8285977: Add links to IEEE 754 specification

2022-05-03 Thread Raffaello Giulietti
On Mon, 2 May 2022 22:55:43 GMT, Joe Darcy wrote: > Please review the addition of @-see links from classes that mention the IEEE > 754 floating-point standard to an IEEE page about the standard. The URL in > the initial version of the PR is the top search result on the IEEE home page > for

Re: RFR: JDK-8285977: Add links to IEEE 754 specification

2022-05-03 Thread Raffaello Giulietti
On Mon, 2 May 2022 22:55:43 GMT, Joe Darcy wrote: > Please review the addition of @-see links from classes that mention the IEEE > 754 floating-point standard to an IEEE page about the standard. The URL in > the initial version of the PR is the top search result on the IEEE home page > for

Re: OpenJDK or SE Java Floating Point Options?

2022-05-02 Thread Raffaello Giulietti
>> May the Java Community Process reconsider the present floating point >> operations [...]? Over the past several weeks, this community has unanimously replied to your concerns with a clear: "No thanks, for the next decades we aren't interested in changing the current semantics of

Integrated: 8285658: Fix two typos in the spec of j.u.random.RandomGenerator

2022-04-27 Thread Raffaello Giulietti
On Tue, 26 Apr 2022 16:38:37 GMT, Raffaello Giulietti wrote: > The spec of the interface `java.util.random.RandomGenerator` is slightly > incorrect when it discusses `float` and `double` random values. This pull request has now been integrated. Changeset: 1f868f1d Author:Raf

Re: RFR: 8285658: Fix two typos in the spec of j.u.random.RandomGenerator [v3]

2022-04-27 Thread Raffaello Giulietti
> The spec of the interface `java.util.random.RandomGenerator` is slightly > incorrect when it discusses `float` and `double` random values. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8285658: Fix two typos in th

Re: RFR: 8285658: Fix two typos in the spec of j.u.random.RandomGenerator [v2]

2022-04-26 Thread Raffaello Giulietti
> The spec of the interface `java.util.random.RandomGenerator` is slightly > incorrect when it discusses `float` and `double` random values. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8285658: Fix two typos in th

Re: RFR: 8285658: Fix two typos in the spec of j.u.random.RandomGenerator

2022-04-26 Thread Raffaello Giulietti
On Tue, 26 Apr 2022 16:38:37 GMT, Raffaello Giulietti wrote: > The spec of the interface `java.util.random.RandomGenerator` is slightly > incorrect when it discusses `float` and `double` random values. This PR fixes the spec and replaces hard-coded literals with static compilation

RFR: 8285658: Fix two typos in the spec of j.u.random.RandomGenerator

2022-04-26 Thread Raffaello Giulietti
The spec of the interface `java.util.random.RandomGenerator` is slightly incorrect when it discusses `float` and `double` random values. - Commit messages: - Fix two typos in the spec of j.u.random.RandomGenerator Changes: https://git.openjdk.java.net/jdk/pull/8404/files Webrev:

Integrated: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double

2022-04-25 Thread Raffaello Giulietti
On Fri, 22 Apr 2022 14:26:07 GMT, Raffaello Giulietti wrote: > Add useful constants specified in IEEE 754. This pull request has now been integrated. Changeset: fb605944 Author: Raffaello Giulietti Committer: Joe Darcy URL: https://git.openjdk.java.net/jdk/com

Re: RFR: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double [v2]

2022-04-22 Thread Raffaello Giulietti
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/jav

Re: RFR: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double [v3]

2022-04-22 Thread Raffaello Giulietti
> 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: ht

Re: RFR: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double [v2]

2022-04-22 Thread Raffaello Giulietti
> 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: ht

Re: RFR: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double

2022-04-22 Thread Raffaello Giulietti
On Fri, 22 Apr 2022 14:26:07 GMT, Raffaello Giulietti wrote: > Add useful constants specified in IEEE 754. The precision of float resp. double values, as defined by IEEE 754, is not easily derivable from the constants in the java.lang.Float resp. java.lang.Double classes. These values

RFR: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double

2022-04-22 Thread Raffaello Giulietti
Add useful constants specified in IEEE 754. - Commit messages: - 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double Changes: https://git.openjdk.java.net/jdk/pull/8362/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8362=00 Issue:

RFR: 8274517: java/util/DoubleStreamSums/CompensatedSums.java fails with expected [true] but found [false]

2022-04-19 Thread Raffaello Giulietti
Please review these small changes to address intermittent failures, as of JDK-8274517. - Usage of jdk.test.lib.RandomFactory for reproducible random generation. - Slightly less restrictive assertion about badParallelStreamError on L94 (former L88). - Verbatim copy of computeFinalSum() from

Integrated: 8284866: Add test to JDK-8273056

2022-04-14 Thread Raffaello Giulietti
On Thu, 14 Apr 2022 11:31:03 GMT, Raffaello Giulietti wrote: > Hello, > this is a followup of JDK-8273056 to add a test to check that > Random.nextExponential() produces non-negative results. This pull request has now been integrated. Changeset: 3ffec3a5 Author:Raffaello

Re: RFR: 8284866: Add test to JDK-8273056 [v2]

2022-04-14 Thread Raffaello Giulietti
> Hello, > this is a followup of JDK-8273056 to add a test to check that > Random.nextExponential() produces non-negative results. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8284866: Add test to JDK-8273056

RFR: 8284866: Add test to JDK-8273056

2022-04-14 Thread Raffaello Giulietti
Hello, this is a followup of JDK-8273056 to add a test to check that Random.nextExponential() produces non-negative results. - Commit messages: - 8284866: Add test to JDK-8273056 Changes: https://git.openjdk.java.net/jdk/pull/8243/files Webrev:

Integrated: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Raffaello Giulietti
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. This pull request has now been integrated

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Raffaello Giulietti
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. j.u.Random and j.u.SplittableRandom do

  1   2   3   4   >