|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apfloat.AprationalMath
public class AprationalMath
Various mathematical functions for arbitrary precision rational numbers.
| Method Summary | |
|---|---|
static Aprational |
abs(Aprational x)
Absolute value. |
static Aprational |
copySign(Aprational x,
Aprational y)
Copy sign from one argument to another. |
static Aprational |
negate(Aprational x)
Deprecated. Use Aprational.negate(). |
static Aprational |
pow(Aprational x,
long n)
Integer power. |
static Aprational |
product(Aprational... x)
Product of numbers. |
static Aprational |
scale(Aprational x,
long scale)
Multiply by a power of the radix. |
static Aprational |
sum(Aprational... x)
Sum of numbers. |
| 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 ArithmeticException,
ApfloatRuntimeException
x - Base of the power operator.n - Exponent of the power operator.
x to the n:th power, that is xn.
ArithmeticException - If both x and n are zero.
ApfloatRuntimeException
@Deprecated
public static Aprational negate(Aprational x)
throws ApfloatRuntimeException
Aprational.negate().
-x.
x - The argument.
-x.
ApfloatRuntimeException
public static Aprational abs(Aprational x)
throws ApfloatRuntimeException
x - The argument.
x.
ApfloatRuntimeException
public static Aprational copySign(Aprational x,
Aprational y)
throws ApfloatRuntimeException
x - The value whose sign is to be adjusted.y - The value whose sign is to be used.
x with its sign changed to match the sign of y.
ApfloatRuntimeException
public static Aprational scale(Aprational x,
long scale)
throws ApfloatRuntimeException
x - The argument.scale - The scaling factor.
x * x.radix()scale.
ApfloatRuntimeException
public static Aprational product(Aprational... x)
throws ApfloatRuntimeException
If there are no arguments, the return value is 1.
x - The argument(s).
ApfloatRuntimeException
public static Aprational sum(Aprational... x)
throws ApfloatRuntimeException
If there are no arguments, the return value is 0.
x - The argument(s).
ApfloatRuntimeException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||