Skip to content

Commit

Permalink
Crash in Java powInt function #261 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuszgromada committed May 29, 2022
1 parent f9719ca commit 9e3a0d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ public static boolean isAlmostInt(double a) {
*/
private static double powInt(double a, int n) {
if (Double.isNaN(a)) return Double.NaN;
if (Double.isInfinite(a)) Math.pow(a, n);
if (Double.isInfinite(a)) return Math.pow(a, n);
if (a == 0) return Math.pow(a, n);
if (n == 0) return 1;
if (n == 1) return a;
Expand Down

0 comments on commit 9e3a0d0

Please sign in to comment.