|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmae.tut.num.Cruncher
Defines static methods to calculate several functions.
Greatest Common Divisor and Exponential functions are included.
| Field Summary | |
static Number |
e
Decimal e |
static Number |
i
Complex i |
| Method Summary | |
static float |
exp(float x)
Raises argument x to e (calls Math.log(x)) |
Number |
exp(Number n)
Raises Number n to e (uses Math class) |
static float |
expPS(float x)
Raises argument x to e approximately. |
Number |
expPS(Number n)
Raises Number n to e (power series approximation) |
static long |
gcd(long a,
long b)
Returns the greatest common divisor of the arguments. |
static float |
log(float x)
Inverse of exp: log of x to base e (calls Math.log(x)) |
Number |
log(Number n)
Inverse of exp: log of n to base e (Works with any subclass) |
static float |
pow(float x,
float a)
Power to the a of x (calls Math.pow(x, a)) |
Number |
pow(Number n,
Number a)
Power to the a of x (Works with any subclass) |
static float |
sqrt(float x)
Square root of x (calls Math.sqrt(x)) |
Number |
sqrt(Number n)
Square root of n (Works with any subclass) |
java.lang.String |
toString()
String representation of this Object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Number i
public static final Number e
| Method Detail |
public java.lang.String toString()
public Number expPS(Number n)
public Number exp(Number n)
public Number log(Number n)
public Number sqrt(Number n)
public Number pow(Number n,
Number a)
public static float expPS(float x)
public static float exp(float x)
public static float log(float x)
public static float sqrt(float x)
public static float pow(float x,
float a)
public static long gcd(long a,
long b)
Invokes static method Rational.gcd().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||