mirror of
https://github.com/openjdk/jdk.git
synced 2026-08-03 06:35:31 +00:00
8364025: MinMaxVector clipping range benchmark highestInt/Long can overflow
Reviewed-by: roland, kxu
This commit is contained in:
parent
bb2cdfe569
commit
67afba7cbe
@ -185,11 +185,11 @@ public class MinMaxVector
|
||||
}
|
||||
|
||||
final IntSummaryStatistics intStats = Arrays.stream(ints).summaryStatistics();
|
||||
highestInt = (intStats.getMax() * range) / 100;
|
||||
highestInt = (int) (intStats.getMax() * (range / 100f));
|
||||
lowestInt = intStats.getMin() + (intStats.getMax() - highestInt);
|
||||
|
||||
final LongSummaryStatistics longStats = Arrays.stream(longs).summaryStatistics();
|
||||
highestLong = (longStats.getMax() * range) / 100;
|
||||
highestLong = (long) (longStats.getMax() * (range / 100f));
|
||||
lowestLong = longStats.getMin() + (longStats.getMax() - highestLong);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user