public class LongCRTMath extends LongBaseMath
long type.| Constructor and Description |
|---|
LongCRTMath(int radix)
Creates a carry-CRT math using the specified radix.
|
| Modifier and Type | Method and Description |
|---|---|
long |
add(long[] src,
long[] srcDst)
Adds three words.
|
long |
compare(long[] src1,
long[] src2)
Compares three words.
|
long |
divide(long[] srcDst)
Divides three words by the base to produce two words.
|
void |
multiply(long[] src,
long factor,
long[] dst)
Multiplies two words by one word to produce a result of three words.
|
void |
subtract(long[] src,
long[] srcDst)
Subtracts three words.
|
baseAdd, baseDivide, baseMultiplyAdd, baseSubtractpublic LongCRTMath(int radix)
radix - The radix that will be used.public final void multiply(long[] src,
long factor,
long[] dst)
src - Source array, first multiplicand.factor - Second multiplicand.dst - Destination array.public final long compare(long[] src1,
long[] src2)
src1 - First operand.src2 - Second operand.src1 < src2, greater than zero if src1 > src2 and zero if src1 == src2.public final long add(long[] src,
long[] srcDst)
src - First operand.srcDst - Second operand, and destination of the operation.public final void subtract(long[] src,
long[] srcDst)
src - First operand.srcDst - Second operand, and destination of the operation.public final long divide(long[] srcDst)
srcDst - Source and destination of the operation.Copyright © 2025. All rights reserved.