|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rossi.dfp.dfpmath
Mathematical routines and constants for use with dfp. Constants are defined with in dfpconstants.java
Field Summary | |
static dfp |
E
E |
static dfp[] |
E_SPLIT
E_SPLIT The number e split in two pieces |
static dfp |
LN10
ln(10) |
static dfp |
LN2
ln(2) |
static dfp[] |
LN2_SPLIT
LN2_SPLIT The number e split in two pieces |
static dfp |
LN5
ln(5) |
static dfp[] |
LN5_SPLIT
LN5_SPLIT The number e split in two pieces |
static dfp |
PI
PI |
static dfp[] |
PI_SPLIT
PI_SPLIT in 2 pieces |
static dfp |
SQR2
sqrt(2) |
static dfp |
SQR2_2
sqrt(2)/2 |
static dfp[] |
SQR2_SPLIT
sqrt(2) in 2 pieces |
static dfp |
SQR3
sqrt(3) |
static dfp |
SQR3_3
sqrt(3)/3 |
Fields inherited from interface rossi.dfp.dfpconstants |
STR_E, STR_LN10, STR_LN2, STR_LN5, STR_PI, STR_SQR2, STR_SQR2_2, STR_SQR3, STR_SQR3_3 |
Constructor Summary | |
dfpmath()
|
Method Summary | |
static dfp |
acos(dfp a)
|
static dfp |
asin(dfp a)
|
static dfp |
atan(dfp a)
computes the arc tangent of the argument Uses the typical taylor series but may reduce arguments using the following identity tan(x+y) = (tan(x) + tan(y)) / (1 - tan(x)*tan(y)) since tan(PI/8) = sqrt(2)-1, atan(x) = atan( (x - sqrt(2) + 1) / (1+x*sqrt(2) - x) + PI/8.0 |
protected static dfp |
atanInternal(dfp a)
|
static dfp |
cos(dfp a)
computes the cosine of the argument |
protected static dfp |
cosInternal(dfp[] a)
Computes cos(a) Used when 0 < a < pi/4. |
static dfp |
exp(dfp a)
Computes e to the given power. |
protected static dfp |
expInternal(dfp a)
Computes e to the given power. |
static dfp |
ln(dfp a)
Returns the natural logarithm of a. |
protected static dfp[] |
lnInternal(dfp[] a)
Computes the natural log of a number between 0 and 2 |
static dfp |
pow(dfp x,
dfp y)
Computes x to the y power. |
static dfp |
pow(dfp base,
int a)
Raises base to the power a by successive squaring |
static dfp |
sin(dfp a)
computes the sine of the argument |
protected static dfp |
sinInternal(dfp[] a)
Computes sin(a) Used when 0 < a < pi/4. |
protected static dfp[] |
split(dfp a)
Splits a dfp into 2 dfp's such that their sum is equal to the input dfp |
protected static dfp[] |
split(java.lang.String a)
Breaks a string representation up into two dfp's such that the sum of them is equivilent to the input string, but has higher precision than using a single dfp. |
protected static dfp[] |
splitDiv(dfp[] a,
dfp[] b)
Divide two numbers that are split in to two pices that are meant to be added together. |
protected static dfp[] |
splitMult(dfp[] a,
dfp[] b)
Multiply two numbers that are split in to two pices that are meant to be added together. |
protected static dfp |
splitPow(dfp[] base,
int a)
Raise a split base to the a power. |
static dfp |
tan(dfp a)
computes the tangent of the argument |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final dfp SQR2
public static final dfp[] SQR2_SPLIT
public static final dfp SQR2_2
public static final dfp SQR3
public static final dfp SQR3_3
public static final dfp PI
public static final dfp[] PI_SPLIT
public static final dfp E
public static final dfp[] E_SPLIT
public static final dfp LN2
public static final dfp[] LN2_SPLIT
public static final dfp LN5
public static final dfp[] LN5_SPLIT
public static final dfp LN10
Constructor Detail |
public dfpmath()
Method Detail |
protected static dfp[] split(java.lang.String a)
protected static dfp[] split(dfp a)
protected static dfp[] splitMult(dfp[] a, dfp[] b)
protected static dfp[] splitDiv(dfp[] a, dfp[] b)
protected static dfp splitPow(dfp[] base, int a)
public static dfp pow(dfp base, int a)
public static dfp exp(dfp a)
protected static dfp expInternal(dfp a)
public static dfp ln(dfp a)
protected static dfp[] lnInternal(dfp[] a)
public static dfp pow(dfp x, dfp y)
Uses the following method:
Special Cases
protected static dfp sinInternal(dfp[] a)
protected static dfp cosInternal(dfp[] a)
public static dfp sin(dfp a)
public static dfp cos(dfp a)
public static dfp tan(dfp a)
protected static dfp atanInternal(dfp a)
public static dfp atan(dfp a)
public static dfp asin(dfp a)
public static dfp acos(dfp a)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |