| java.lang.Object org.jscience.mathematics.number.Calculus
Calculus | final class Calculus (Code) | | This class holds utilities upon arrays of positive long .
author: Jean-Marie Dautelle version: 3.3, January 14, 2006 |
Inner Class :final static class MultiplyLogic implements Runnable | |
Method Summary | |
static int | add(long[] x, int xSize, long y) | static int | add(long[] x, int xSize, long[] y, int ySize, long[] z) | static int | compare(long[] x, long[] y, int size) | static long | divide(long[] x, int xSize, int y, long[] z) z = x / y
Preconditions: y is positive (31 bits). | static int | multiply(long[] x, int xSize, long y, long[] z) | static int | multiply(long[] x, int xSize, long[] y, int ySize, long[] z) | static int | shiftLeft(int wordShift, int bitShift, long[] x, int xSize, long[] z) | static int | shiftRight(int wordShift, int bitShift, long[] x, int xSize, long[] z) | static int | subtract(long[] x, int xSize, long[] y, int ySize, long[] z) |
MASK_31 | final static long MASK_31(Code) | | |
MASK_32 | final static long MASK_32(Code) | | |
MASK_63 | final static long MASK_63(Code) | | |
MASK_8 | final static long MASK_8(Code) | | |
add | static int add(long[] x, int xSize, long y)(Code) | | x += y
x size |
add | static int add(long[] x, int xSize, long[] y, int ySize, long[] z)(Code) | | z = x + y
Preconditions: xSize >= ySize
z size |
compare | static int compare(long[] x, long[] y, int size)(Code) | | x.compare(y)
Preconditions: xSize = ySize = size
1, -1, 0 |
divide | static long divide(long[] x, int xSize, int y, long[] z)(Code) | | z = x / y
Preconditions: y is positive (31 bits).
remainder |
multiply | static int multiply(long[] x, int xSize, long y, long[] z)(Code) | | z = x * y
Preconditions: y != 0, x != 0
z size |
multiply | static int multiply(long[] x, int xSize, long[] y, int ySize, long[] z)(Code) | | z = x * y
Preconditions: y != 0, xSize >= ySize
z size |
shiftLeft | static int shiftLeft(int wordShift, int bitShift, long[] x, int xSize, long[] z)(Code) | | x << n
Preconditions: xSize != 0
z size |
shiftRight | static int shiftRight(int wordShift, int bitShift, long[] x, int xSize, long[] z)(Code) | | x >> n
Preconditions: xSize > wordShift
z size |
subtract | static int subtract(long[] x, int xSize, long[] y, int ySize, long[] z)(Code) | | z = x - y
Preconditions: x >= y
z size |
|
|