|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apfloat.AprationalMath
Various mathematical functions for arbitrary precision rational numbers.
Method Summary | |
static Aprational |
abs(Aprational x)
Absolute value. |
static Aprational |
negate(Aprational x)
Returns an aprational whose value is -x . |
static Aprational |
pow(Aprational x,
long n)
Integer power. |
static Aprational |
scale(Aprational x,
long scale)
Multiply by a power of the radix. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Aprational pow(Aprational x, long n) throws java.lang.ArithmeticException, ApfloatRuntimeException
x
- Base of the power operator.n
- Exponent of the power operator.
x
to the n
:th power, that is xn
.
java.lang.ArithmeticException
- If both x
and n
are zero.
ApfloatRuntimeException
public static Aprational negate(Aprational x) throws ApfloatRuntimeException
-x
.
x
- The argument.
-x
.
ApfloatRuntimeException
public static Aprational abs(Aprational x) throws ApfloatRuntimeException
x
- The argument.
x
.
ApfloatRuntimeException
public static Aprational scale(Aprational x, long scale) throws ApfloatRuntimeException
x
- The argument.scale
- The scaling factor.
x * x.radix()scale
.
ApfloatRuntimeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |