|
|||||||||
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
public final class MathDouble
The MathDouble class encapsulates double numbers. Methods will automatically promote objects from subsets.
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(double x)
|
static MathDouble |
acos(MathDouble x)
Returns the arc cosine of a number. |
static MathDouble |
acos(java.lang.Number x)
|
static MathDouble |
acosh(double x)
|
static MathDouble |
acosh(MathDouble x)
Returns the arc hyperbolic cosine of a number. |
static MathDouble |
acosh(java.lang.Number x)
|
AbelianGroup.Member |
add(AbelianGroup.Member n)
Returns the addition of this number and another. |
MathDouble |
add(double y)
|
MathDouble |
add(MathDouble n)
Returns the addition of this double number and another. |
static MathDouble |
asin(double x)
|
static MathDouble |
asin(MathDouble x)
Returns the arc sine of a number. |
static MathDouble |
asin(java.lang.Number x)
|
static MathDouble |
asinh(double x)
|
static MathDouble |
asinh(MathDouble x)
Returns the arc hyperbolic sine of a number. |
static MathDouble |
asinh(java.lang.Number x)
|
static MathDouble |
atan(double x)
|
static MathDouble |
atan(MathDouble x)
Returns the arc tangent of a number. |
static MathDouble |
atan(java.lang.Number x)
|
static MathDouble |
atanh(double x)
|
static MathDouble |
atanh(MathDouble x)
Returns the arc hyperbolic tangent of a number. |
static MathDouble |
atanh(java.lang.Number x)
|
int |
compareTo(java.lang.Object obj)
Compares two numbers. |
static MathDouble |
cos(double x)
|
static MathDouble |
cos(MathDouble x)
Returns the trigonometric cosine of an angle. |
static MathDouble |
cos(java.lang.Number x)
|
static MathDouble |
cosh(double x)
|
static MathDouble |
cosh(MathDouble x)
Returns the hyperbolic cosine of a number. |
static MathDouble |
cosh(java.lang.Number x)
|
MathDouble |
divide(double y)
|
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 numbers for equality. |
boolean |
equals(java.lang.Object obj,
double tol)
|
static MathDouble |
exp(double x)
|
static MathDouble |
exp(MathDouble x)
Returns the exponential number e(2.718...) raised to the power of a number. |
static MathDouble |
exp(java.lang.Number x)
|
float |
floatValue()
|
java.lang.Object |
getSet()
|
int |
hashCode()
|
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(double x)
|
static MathDouble |
log(MathDouble x)
Returns the natural logarithm (base e) of a number. |
static MathDouble |
log(java.lang.Number x)
|
long |
longValue()
|
MathDouble |
multiply(double y)
|
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(double x)
|
static MathDouble |
sin(MathDouble x)
Returns the trigonometric sine of an angle. |
static MathDouble |
sin(java.lang.Number x)
|
static MathDouble |
sinh(double x)
|
static MathDouble |
sinh(MathDouble x)
Returns the hyperbolic sine of a number. |
static MathDouble |
sinh(java.lang.Number x)
|
AbelianGroup.Member |
subtract(AbelianGroup.Member n)
Returns the subtraction of this number and another. |
MathDouble |
subtract(double y)
|
MathDouble |
subtract(MathDouble n)
Returns the subtraction of this double number and another. |
static MathDouble |
tan(double x)
|
static MathDouble |
tan(MathDouble x)
Returns the trigonometric tangent of an angle. |
static MathDouble |
tan(java.lang.Number x)
|
static MathDouble |
tanh(double x)
|
static MathDouble |
tanh(MathDouble x)
Returns the hyperbolic tangent of a number. |
static MathDouble |
tanh(java.lang.Number x)
|
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, 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)
equals
in class java.lang.Object
obj
- a number.public boolean equals(java.lang.Object obj, double tol)
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object obj) throws java.lang.IllegalArgumentException
compareTo
in interface java.lang.Comparable
obj
- a number.
this<obj
,
zero if this==obj
,
and a positive value if this>obj
.
java.lang.IllegalArgumentException
public java.lang.String toString()
toString
in class java.lang.Object
public double value()
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
public static boolean isZero(double x)
public boolean isNaN()
public boolean isInfinite()
public java.lang.Object getSet()
getSet
in interface Member
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 MathDouble add(double y)
public AbelianGroup.Member subtract(AbelianGroup.Member n)
subtract
in interface AbelianGroup.Member
n
- a group memberpublic MathDouble subtract(MathDouble n)
public MathDouble subtract(double y)
public Ring.Member multiply(Ring.Member n)
multiply
in interface Ring.Member
n
- a ring memberpublic MathDouble multiply(MathDouble n)
public MathDouble multiply(double y)
public Field.Member divide(Field.Member n)
divide
in interface Field.Member
n
- a field memberpublic MathDouble divide(MathDouble n)
public MathDouble divide(double y)
public static MathDouble exp(MathDouble x)
public static MathDouble exp(java.lang.Number x)
public static MathDouble exp(double x)
public static MathDouble log(MathDouble x)
public static MathDouble log(java.lang.Number x)
public static MathDouble log(double x)
public static MathDouble sin(MathDouble x)
x
- an angle that is measured in radianspublic static MathDouble sin(java.lang.Number x)
public static MathDouble sin(double x)
public static MathDouble cos(MathDouble x)
x
- an angle that is measured in radianspublic static MathDouble cos(java.lang.Number x)
public static MathDouble cos(double x)
public static MathDouble tan(MathDouble x)
x
- an angle that is measured in radianspublic static MathDouble tan(java.lang.Number x)
public static MathDouble tan(double x)
public static MathDouble sinh(MathDouble x)
public static MathDouble sinh(java.lang.Number x)
public static MathDouble sinh(double x)
public static MathDouble cosh(MathDouble x)
public static MathDouble cosh(java.lang.Number x)
public static MathDouble cosh(double x)
public static MathDouble tanh(MathDouble x)
public static MathDouble tanh(java.lang.Number x)
public static MathDouble tanh(double x)
public static MathDouble asin(MathDouble x)
public static MathDouble asin(java.lang.Number x)
public static MathDouble asin(double x)
public static MathDouble acos(MathDouble x)
public static MathDouble acos(java.lang.Number x)
public static MathDouble acos(double x)
public static MathDouble atan(MathDouble x)
public static MathDouble atan(java.lang.Number x)
public static MathDouble atan(double x)
public static MathDouble asinh(MathDouble x)
public static MathDouble asinh(java.lang.Number x)
public static MathDouble asinh(double x)
public static MathDouble acosh(MathDouble x)
public static MathDouble acosh(java.lang.Number x)
public static MathDouble acosh(double x)
public static MathDouble atanh(MathDouble x)
public static MathDouble atanh(java.lang.Number x)
public static MathDouble atanh(double x)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |