public final class PowerImplementations
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
intpower(int l,
int r) |
static long |
longpower(int l,
int r) |
static double |
power(double l,
double r) |
static double |
power(double l,
int n)
A fast routine for computing integer powers.
|
public static final long longpower(int l, int r)
public static final int intpower(int l, int r)
public static final double power(double l, double r)
public static final double power(double l, int n)
l
- number to be taken to a power.n
- power to take x to. 0 <= n <= Integer.MAX_VALUE
Negative numbers will be treated as unsigned positives.Copyright © 2018 Singular Systems http://www.singularsys.com/jep