> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
Brian Burkhalter has updated the pull request incrementally with one additional
commit since the last
On Thu, 22 Jul 2021 19:40:46 GMT, Brian Burkhalter wrote:
>> Please consider this proposal to add `divideExact()` methods for integral
>> data types to `java.lang.Math` thereby rounding out "exact" support to all
>> four basic arithmetic operations.
>
> Brian Burkhalter has updated the pull
> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
Brian Burkhalter has updated the pull request incrementally with one additional
commit since the last
> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
Brian Burkhalter has refreshed the contents of this pull request, and previous
commits have been removed.
> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
Brian Burkhalter has updated the pull request incrementally with one additional
commit since the last
On Wed, 14 Jul 2021 16:45:20 GMT, Joe Darcy wrote:
> Are there examples in the JDK or its tests where a method with this
> definition would be used?
I have not identified any as yet. I did verify however that there are no uses
in `open/src/**/*.java` of either `absExact()` or `negateExact()`,
On Wed, 14 Jul 2021 16:43:32 GMT, Joe Darcy wrote:
>> Brian Burkhalter has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8075806: Separate div-by-0 verbiage; change impl
>
> src/java.base/share/classes/java/lang/Math.java line 1008:
>
>>
> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
Brian Burkhalter has updated the pull request incrementally with one additional
commit since the last
Mysteries of JIT compilation...
On 2021-07-14 21:53, Brian Burkhalter wrote:
On Tue, 13 Jul 2021 17:21:52 GMT, Brian Burkhalter wrote:
Please consider this proposal to add `divideExact()` methods for integral data types to
`java.lang.Math` thereby rounding out "exact" support to all four
On Tue, 13 Jul 2021 17:21:52 GMT, Brian Burkhalter wrote:
> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
@rgiulietti Actually your trick is the
On Tue, 13 Jul 2021 17:21:52 GMT, Brian Burkhalter wrote:
> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
Thanks. I was thinking of leveraging the
Sorry, typo
int q = x / y;
if ((x & y & q) >= 0) {
return q; // q, not r
}
throw new ArithmeticException("integer overflow");
On 2021-07-14 21:26, Raffaello Giulietti wrote:
One could also divide first and then check the result:
int q = x / y;
if ((x & y & q) >= 0) {
return r;
}
One could also divide first and then check the result:
int q = x / y;
if ((x & y & q) >= 0) {
return r;
}
throw new ArithmeticException("integer overflow");
No idea about relative perf.
On 2021-07-13 19:32, Brian Burkhalter wrote:
Please consider this proposal to add `divideExact()`
On Tue, 13 Jul 2021 17:21:52 GMT, Brian Burkhalter wrote:
> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
Are there examples in the JDK or its tests
On Tue, 13 Jul 2021 17:21:52 GMT, Brian Burkhalter wrote:
> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
Note: The `StrictMath` equivalents were
Please consider this proposal to add `divideExact()` methods for integral data
types to `java.lang.Math` thereby rounding out "exact" support to all four
basic arithmetic operations.
-
Commit messages:
- 8075806: divideExact is missing in java.lang.Math
Changes:
16 matches
Mail list logo