|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Number JSci.maths.MathDouble
The MathDouble class encapsulates double numbers.
RealField
,
Serialized FormConstructor Summary | |
MathDouble(double num)
Constructs a double number. |
|
MathDouble(java.lang.String s)
Constructs the double number represented by a string. |
Method Summary | |
static MathDouble |
acos(MathDouble x)
Returns the arc cosine of a number. |
static MathDouble |
acosh(MathDouble x)
Returns the arc hyperbolic cosine of a number. |
AbelianGroup.Member |
add(AbelianGroup.Member n)
Returns the addition of this number and another. |
MathDouble |
add(MathDouble n)
Returns the addition of this double number and another. |
static MathDouble |
asin(MathDouble x)
Returns the arc sine of a number. |
static MathDouble |
asinh(MathDouble x)
Returns the arc hyperbolic sine of a number. |
static MathDouble |
atan(MathDouble x)
Returns the arc tangent of a number. |
static MathDouble |
atanh(MathDouble x)
Returns the arc hyperbolic tangent of a number. |
int |
compareTo(java.lang.Object obj)
Compares two double numbers. |
static MathDouble |
cos(MathDouble x)
Returns the trigonometric cosine of an angle. |
static MathDouble |
cosh(MathDouble x)
Returns the hyperbolic cosine of a number. |
Field.Member |
divide(Field.Member n)
Returns the division of this number and another. |
MathDouble |
divide(MathDouble n)
Returns the division of this double number and another. |
double |
doubleValue()
|
boolean |
equals(java.lang.Object obj)
Compares two double numbers for equality. |
static MathDouble |
exp(MathDouble x)
Returns the exponential number e(2.718...) raised to the power of a number. |
float |
floatValue()
|
int |
intValue()
|
Field.Member |
inverse()
Returns the inverse of this number. |
boolean |
isInfinite()
Returns true if this number is infinite. |
boolean |
isNaN()
Returns true if this number is NaN. |
static boolean |
isZero(double x)
Returns true if the number is within the zero tolerance. |
static MathDouble |
log(MathDouble x)
Returns the natural logarithm (base e) of a number. |
long |
longValue()
|
MathDouble |
multiply(MathDouble n)
Returns the multiplication of this double number and another. |
Ring.Member |
multiply(Ring.Member n)
Returns the multiplication of this number and another. |
AbelianGroup.Member |
negate()
Returns the negative of this number. |
static MathDouble |
sin(MathDouble x)
Returns the trigonometric sine of an angle. |
static MathDouble |
sinh(MathDouble x)
Returns the hyperbolic sine of a number. |
AbelianGroup.Member |
subtract(AbelianGroup.Member n)
Returns the subtraction of this number and another. |
MathDouble |
subtract(MathDouble n)
Returns the subtraction of this double number and another. |
static MathDouble |
tan(MathDouble x)
Returns the trigonometric tangent of an angle. |
static MathDouble |
tanh(MathDouble x)
Returns the hyperbolic tangent of a number. |
java.lang.String |
toString()
Returns a string representing the value of this double number. |
double |
value()
Returns the double value. |
Methods inherited from class java.lang.Number |
byteValue, shortValue |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MathDouble(double num)
public MathDouble(java.lang.String s) throws java.lang.NumberFormatException
s
- a string representing a double number.
java.lang.NumberFormatException
- if the string does not contain a parsable number.Method Detail |
public boolean equals(java.lang.Object obj)
obj
- a double number.public int compareTo(java.lang.Object obj) throws java.lang.IllegalArgumentException
compareTo
in interface java.lang.Comparable
obj
- a double number.
this<obj
,
zero if this==obj
,
and a positive value if this>obj
.
java.lang.IllegalArgumentException
public java.lang.String toString()
public double value()
public int intValue()
public long longValue()
public float floatValue()
public double doubleValue()
public static boolean isZero(double x)
public boolean isNaN()
public boolean isInfinite()
public AbelianGroup.Member negate()
negate
in interface AbelianGroup.Member
public Field.Member inverse()
inverse
in interface Field.Member
public AbelianGroup.Member add(AbelianGroup.Member n)
add
in interface AbelianGroup.Member
n
- a group memberpublic MathDouble add(MathDouble n)
public AbelianGroup.Member subtract(AbelianGroup.Member n)
subtract
in interface AbelianGroup.Member
n
- a group memberpublic MathDouble subtract(MathDouble n)
public Ring.Member multiply(Ring.Member n)
multiply
in interface Ring.Member
n
- a ring memberpublic MathDouble multiply(MathDouble n)
public Field.Member divide(Field.Member n)
divide
in interface Field.Member
n
- a field memberpublic MathDouble divide(MathDouble n)
public static MathDouble exp(MathDouble x)
public static MathDouble log(MathDouble x)
public static MathDouble sin(MathDouble x)
x
- an angle that is measured in radianspublic static MathDouble cos(MathDouble x)
x
- an angle that is measured in radianspublic static MathDouble tan(MathDouble x)
x
- an angle that is measured in radianspublic static MathDouble sinh(MathDouble x)
public static MathDouble cosh(MathDouble x)
public static MathDouble tanh(MathDouble x)
public static MathDouble asin(MathDouble x)
public static MathDouble acos(MathDouble x)
public static MathDouble atan(MathDouble x)
public static MathDouble asinh(MathDouble x)
public static MathDouble acosh(MathDouble x)
public static MathDouble atanh(MathDouble x)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |