JScience v3.3

org.jscience.mathematics.numbers
Class Float64

java.lang.Object
  extended by javolution.context.RealtimeObject
      extended by org.jscience.mathematics.numbers.Number<Float64>
          extended by org.jscience.mathematics.numbers.Float64
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Float64>, Realtime, Immutable, Field<Float64>, GroupAdditive<Float64>, GroupMultiplicative<Float64>, Ring<Float64>, Structure<Float64>

public final class Float64
extends Number<Float64>
implements Field<Float64>

This class represents a 64 bits floating point number.

Version:
3.0, February 13, 2006
Author:
Jean-Marie Dautelle
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javolution.context.RealtimeObject
RealtimeObject.Factory<T extends RealtimeObject>
 
Nested classes/interfaces inherited from interface javolution.context.Realtime
Realtime.ObjectSpace
 
Field Summary
static Float64 ONE
          The 64 bits floating point representing one.
protected static XMLFormat<Float64> XML
          Holds the default XML representation for 64 bits floating point numbers.
static Float64 ZERO
          The 64 bits floating point representing zero.
 
Method Summary
 Float64 abs()
          Returns the absolute value of this number.
 int compareTo(Float64 that)
          Compares this number with the specified number for order.
 Float64 divide(double value)
          Returns this number divided by the specified value.
 Float64 divide(Float64 that)
          Returns this number divided by the one specified.
 double doubleValue()
          Returns the value of this number as a double.
 boolean equal(double value)
          Indicates if this number is equal to the specified value.
 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.
 int hashCode()
          Returns the hash code for this number.
 Float64 inverse()
          Returns the reciprocal of this number.
 boolean isGreaterThan(double value)
          Indicates if this number is ordered after the specified value.
 boolean isInfinite()
          Indicates if this number is infinite.
 boolean isLargerThan(double value)
          Compares the absolute value of this number with the specified value.
 boolean isLargerThan(Float64 that)
          Compares the absolute value of this number with that number.
 boolean isLessThan(double value)
          Indicates if this number is ordered before the specified value.
 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 minus(double value)
          Returns the difference between this number and the specified value.
 Float64 minus(Float64 that)
          Returns the difference between this number and the one specified.
 Float64 opposite()
          Returns the opposite of this number.
 Float64 plus(double value)
          Returns the sum of this number with the specified value.
 Float64 plus(Float64 that)
          Returns the sum of this number 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.
 Float64 sqrt()
          Returns the positive square root of this number.
 Float64 times(double value)
          Returns the product of this number with the specified value.
 Float64 times(Float64 that)
          Returns the product of this number with the one specified.
 Text toText()
          Returns the decimal text representation of this number.
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 from the specified double value.
 
Methods inherited from class org.jscience.mathematics.numbers.Number
byteValue, floatValue, intValue, isGreaterThan, isLessThan, move, pow, shortValue
 
Methods inherited from class javolution.context.RealtimeObject
export, isLocal, moveHeap, preserve, toString, unpreserve
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javolution.context.Realtime
move
 

Field Detail

XML

protected static final XMLFormat<Float64> XML
Holds the default XML representation for 64 bits floating point numbers. This representation consists of a simple value attribute holding the textual representation.


ZERO

public static final Float64 ZERO
The 64 bits floating point representing zero.


ONE

public static final Float64 ONE
The 64 bits floating point representing one.

Method Detail

valueOf

public static Float64 valueOf(double doubleValue)
Returns the 64 bits float from the specified double value.

Parameters:
doubleValue - the double value for this number.
Returns:
the corresponding number.
See Also:
doubleValue()

valueOf

public static Float64 valueOf(java.lang.CharSequence chars)
Returns the number for the specified character sequence.

Parameters:
chars - the character sequence.
Returns:
the corresponding number.

isInfinite

public boolean isInfinite()
Indicates if this number is infinite.

Returns:
true if this number is infinite; false otherwise.

isNaN

public boolean isNaN()
Indicates if this number is not a number.

Returns:
true if this number is NaN; false otherwise.

opposite

public Float64 opposite()
Returns the opposite of this number.

Specified by:
opposite in interface GroupAdditive<Float64>
Returns:
-this.

plus

public Float64 plus(Float64 that)
Returns the sum of this number with the one specified.

Specified by:
plus in interface GroupAdditive<Float64>
Parameters:
that - the number to be added.
Returns:
this + that.

plus

public Float64 plus(double value)
Returns the sum of this number with the specified value.

Parameters:
value - the value to be added.
Returns:
this + value.

minus

public Float64 minus(Float64 that)
Returns the difference between this number and the one specified.

Overrides:
minus in class Number<Float64>
Parameters:
that - the number to be subtracted.
Returns:
this - that.

minus

public Float64 minus(double value)
Returns the difference between this number and the specified value.

Parameters:
value - the value to be subtracted.
Returns:
this - value.

times

public Float64 times(Float64 that)
Returns the product of this number with the one specified.

Specified by:
times in interface GroupMultiplicative<Float64>
Specified by:
times in interface Ring<Float64>
Parameters:
that - the number multiplier.
Returns:
this · that.

times

public Float64 times(double value)
Returns the product of this number with the specified value.

Parameters:
value - the value multiplier.
Returns:
this · value.

inverse

public Float64 inverse()
Returns the reciprocal of this number.

Specified by:
inverse in interface GroupMultiplicative<Float64>
Returns:
1 / this.

divide

public Float64 divide(Float64 that)
Returns this number divided by the one specified.

Parameters:
that - the number divisor.
Returns:
this / that.

divide

public Float64 divide(double value)
Returns this number divided by the specified value.

Parameters:
value - the value divisor.
Returns:
this / value.

equal

public boolean equal(double value)
Indicates if this number is equal to the specified value.

Parameters:
value - the value to compare with.
Returns:
this.doubleValue() == value.

isLessThan

public boolean isLessThan(double value)
Indicates if this number is ordered before the specified value.

Parameters:
value - the value to compare with.
Returns:
this.doubleValue() < value.

isGreaterThan

public boolean isGreaterThan(double value)
Indicates if this number is ordered after the specified value.

Parameters:
value - the value to compare with.
Returns:
this.doubleValue() > value.

isLargerThan

public boolean isLargerThan(Float64 that)
Compares the absolute value of this number with that number.

Specified by:
isLargerThan in class Number<Float64>
Parameters:
that - the number to compare with.
Returns:
|this| > |that|

isLargerThan

public boolean isLargerThan(double value)
Compares the absolute value of this number with the specified value.

Parameters:
value - the value to compare with.
Returns:
|this| > |value|

abs

public Float64 abs()
Returns the absolute value of this number.

Returns:
|this|.

sqrt

public Float64 sqrt()
Returns the positive square root of this number.

Returns:
sqrt(this).

exp

public Float64 exp()
Returns the exponential number e raised to the power of this number.

Returns:
exp(this).

log

public Float64 log()
Returns the natural logarithm (base e) of this number.

Returns:
log(this).

pow

public Float64 pow(Float64 that)
Returns this number raised to the power of the specified exponent.

Parameters:
that - the exponent.
Returns:
this**that.

pow

public Float64 pow(double e)
Returns this number raised to the specified power.

Parameters:
e - the exponent.
Returns:
this**e.

toText

public Text toText()
Returns the decimal text representation of this number.

Specified by:
toText in interface Realtime
Specified by:
toText in class Number<Float64>
Returns:
the text representation of this number.

equals

public boolean equals(java.lang.Object that)
Compares this number against the specified object.

Specified by:
equals in class Number<Float64>
Parameters:
that - the object to compare with.
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Returns the hash code for this number.

Specified by:
hashCode in class Number<Float64>
Returns:
the hash code value.

longValue

public long longValue()
Description copied from class: Number
Returns the value of this number as a long.

Specified by:
longValue in class Number<Float64>
Returns:
the numeric value represented by this object after conversion to type long.

doubleValue

public double doubleValue()
Description copied from class: Number
Returns the value of this number as a double.

Specified by:
doubleValue in class Number<Float64>
Returns:
the numeric value represented by this object after conversion to type double.

compareTo

public int compareTo(Float64 that)
Description copied from class: Number
Compares this number with the specified number for order. Returns a negative integer, zero, or a positive integer as this number is less than, equal to, or greater than the specified number. Implementation must ensure that this method is consistent with equals (x.compareTo(y)==0) == (x.equals(y)),

Specified by:
compareTo in interface java.lang.Comparable<Float64>
Specified by:
compareTo in class Number<Float64>
Parameters:
that - the number to be compared.
Returns:
a negative integer, zero, or a positive integer as this number is less than, equal to, or greater than the specified number.

JScience v3.3

Copyright © 2006 JScience.