|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
com.dautelle.math.numbers.RealtimeNumber
com.dautelle.math.numbers.Float64
This class represents a 64 bits floating point number.
Nested Class Summary | |
static class |
Float64.Value
This inner class represents a mutable image of an immutable Float64 . |
Nested classes inherited from class com.dautelle.math.numbers.RealtimeNumber |
RealtimeNumber.Factory |
Field Summary | |
static Float64 |
ONE
The 64 bits float one. |
static Float64 |
ZERO
The 64 bits floating point representing zero. |
Method Summary | |
Float64 |
abs()
Returns the absolute value of this number. |
Float64 |
add(Float64 that)
Returns the sum of this number with the one specified. |
java.lang.StringBuffer |
appendTo(java.lang.StringBuffer sb)
Appends the decimal text representation of this number to the StringBuffer argument. |
int |
compareTo(Float64 that)
Compares two 64 bits float numerically. |
int |
compareTo(java.lang.Object that)
|
Float64 |
divide(Float64 that)
Returns this number divided by the one specified. |
double |
doubleValue()
Returns the value of this number as a double . |
boolean |
equals(java.lang.Object that)
Compares this number against the specified object. |
Float64 |
exp()
Returns the exponential number e raised to the power of this number. |
float |
floatValue()
Returns the value of this number as a float . |
int |
hashCode()
Returns the hash code for this number. |
int |
intValue()
Returns the value of this number as an int . |
Float64 |
inverse()
Returns the inverse of this number. |
boolean |
isInfinite()
Indicates if this number is infinite. |
boolean |
isNaN()
Indicates if this number is not a number. |
Float64 |
log()
Returns the natural logarithm (base e) of this number. |
long |
longValue()
Returns the value of this number as a long . |
Float64 |
multiply(Float64 that)
Returns the product of this number with the one specified. |
Float64 |
negate()
Returns the negation of this number. |
Operable |
opposite()
Returns the additive inverse of this object. |
Operable |
plus(Operable that)
Returns the sum of this object with the one specified. |
Float64 |
pow(double e)
Returns this number raised to the specified power. |
Float64 |
pow(Float64 that)
Returns this number raised to the power of the specified exponent. |
Operable |
reciprocal()
Returns the multiplicative inverse of this object. |
Float64 |
sqrt()
Returns the positive square root of this number. |
Float64 |
subtract(Float64 that)
Returns the difference between this number and the one specified. |
Operable |
times(Operable that)
Returns the product of this object with the one specified. |
java.lang.String |
toString()
Returns the decimal text representation of this number. |
void |
toXml(XmlElement xml)
Sets the attributes and content of the XML element corresponding to this object. |
static Float64 |
valueOf(java.lang.CharSequence chars)
Returns the number for the specified character sequence. |
static Float64 |
valueOf(double doubleValue)
Returns the 64 bits float of specified double value. |
static Float64 |
valueOf(XmlElement xml)
XML factory method. |
Methods inherited from class com.dautelle.math.numbers.RealtimeNumber |
clone, export, isLocalObject, isPoolObject, pow, recycle, toHeap |
Methods inherited from class java.lang.Number |
byteValue, shortValue |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Float64 ZERO
public static final Float64 ONE
Method Detail |
public static Float64 valueOf(double doubleValue)
double
value.
doubleValue
- the double
value for this number.
doubleValue()
public static Float64 valueOf(java.lang.CharSequence chars)
chars
- the character sequence.
public static Float64 valueOf(XmlElement xml)
xml
- the XML element describing the number to return (e.g.
<math:Float64 value="0.0"/>
).
public boolean isInfinite()
true
if this number is infinite;
false
otherwise.public boolean isNaN()
true
if this number is NaN;
false
otherwise.public Float64 negate()
-this
.public Float64 add(Float64 that)
that
- the number to be added.
this + that
.public Float64 subtract(Float64 that)
that
- the number to be subtracted.
this - that
.public Float64 multiply(Float64 that)
that
- the number multiplier.
this * that
.public Float64 inverse()
1 / this
.public Float64 divide(Float64 that)
that
- the number divisor.
this / that
.public Float64 abs()
abs(this)
.public Float64 sqrt()
sqrt(this)
.public Float64 exp()
exp(this)
.public Float64 log()
log(this)
.public Float64 pow(double e)
e
- the exponent.
this**e
.public Float64 pow(Float64 that)
that
- the exponent.
this**that
.public java.lang.StringBuffer appendTo(java.lang.StringBuffer sb)
StringBuffer
argument.
sb
- the StrinBuffer
to append.
StrinBuffer
.public java.lang.String toString()
public boolean equals(java.lang.Object that)
that
- the object to compare with.
true
if the objects are the same;
false
otherwise.public int hashCode()
public int intValue()
int
.
int
value.public long longValue()
long
.
long
value.public float floatValue()
float
.
float
value.public double doubleValue()
double
.
double
value.public int compareTo(Float64 that)
that
- the number to compare with.
that
.public int compareTo(java.lang.Object that)
compareTo
in interface java.lang.Comparable
public Operable plus(Operable that)
Operable
plus
in interface Operable
that
- the object to be added.
this + that
.public Operable opposite()
Operable
this.plus(this.opposite()) == ZERO
,
with ZERO
being the additive identity.
opposite
in interface Operable
-this
.public Operable times(Operable that)
Operable
times
in interface Operable
that
- the object multiplier.
this * that
.public Operable reciprocal()
Operable
this.times(this.reciprocal()) == ONE
,
with ONE
being the multiplicative identity.
reciprocal
in interface Operable
ONE / this
.public void toXml(XmlElement xml)
Representable
toXml
in interface Representable
xml
- the XML element to set according to this object's desired XML
representation.
|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |