|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apfloat.internal.DoubleCRTMath
Basic arithmetic for calculating the Chinese Remainder
Theorem. Works for the double
type.
Field Summary |
Fields inherited from interface org.apfloat.internal.DoubleModConstants |
MAX_POWER_OF_TWO_BASE, MAX_POWER_OF_TWO_BITS, MAX_TRANSFORM_LENGTH, MODULUS, PRIMITIVE_ROOT |
Fields inherited from interface org.apfloat.internal.DoubleRadixConstants |
BASE, BASE_DIGITS, MAX_EXPONENT, MINIMUM_FOR_DIGITS |
Constructor Summary | |
DoubleCRTMath(int radix)
Creates a carry-CRT math using the specified radix. |
Method Summary | |
double |
add(double[] src,
double[] srcDst)
Adds three words. |
double |
compare(double[] src1,
double[] src2)
Compares three words. |
double |
divide(double[] srcDst)
Divides three words by the base to produce two words. |
void |
multiply(double[] src,
double factor,
double[] dst)
Multiplies two words by one word to produce a result of three words. |
void |
subtract(double[] src,
double[] srcDst)
Subtracts three words. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DoubleCRTMath(int radix)
radix
- The radix that will be used.Method Detail |
public final void multiply(double[] src, double factor, double[] dst)
src
- Source array, first multiplicand.factor
- Second multiplicand.dst
- Destination array.public final double compare(double[] src1, double[] src2)
src1
- First operand.src2
- Second operand.
src1 < src2
, greater than zero if src1 > src2
and zero if src1 == src2
.public final double add(double[] src, double[] srcDst)
src
- First operand.srcDst
- Second operand, and destination of the operation.
public final void subtract(double[] src, double[] srcDst)
src
- First operand.srcDst
- Second operand, and destination of the operation.public final double divide(double[] srcDst)
srcDst
- Source and destination of the operation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |