Skip to content
Permalink
Browse files
Use specialized "pow" function.
  • Loading branch information
Gilles Sadowski committed Jan 27, 2022
1 parent 06301d0 commit c5ea177934387de3b2de813173b78b6debdf149a
Showing 1 changed file with 2 additions and 1 deletion.
@@ -16,6 +16,7 @@
*/
package org.apache.commons.math4.legacy.analysis.integration;

import org.apache.commons.numbers.core.ArithmeticUtils;
import org.apache.commons.math4.legacy.exception.NumberIsTooLargeException;
import org.apache.commons.math4.core.jdkmath.JdkMath;

@@ -113,7 +114,7 @@ private double stage(final int n,
double diffMaxMin) {
// number of points in the previous stage. This stage will contribute
// 2*3^{n-1} more points.
final long np = (long) JdkMath.pow(3, n - 1);
final long np = ArithmeticUtils.pow(3L, n - 1);
double sum = 0;

// spacing between adjacent new points

0 comments on commit c5ea177

Please sign in to comment.