On Wed, 30 Nov 2022 12:48:10 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> If the casts in the numerator actually matter, then the cast in the 
>> denominator can be removed. The latter are the ones that Eclipse flags for 
>> me as unnecessary.
>
> I still think that any change here would be a very low value change. If done 
> incorrectly, as it was in the initial attempt, it can introduce bugs. Even if 
> done correctly, I see no point in it.

@kevinrushforth This has been mostly reverted, and is a lesson for me to not do 
more than what the warning suggests without checking very carefully. It just 
looked like a bunch of unnecessary casts, but it is has one edge case with 
negation overflow of a signed integer that I missed (whether it can happen in 
practice I did not analyze further).

-------------

PR: https://git.openjdk.org/jfx/pull/960

Reply via email to