org.jscience.mathematics.algebraic.numbers
Class Float

java.lang.Object
  extended by java.lang.Number
      extended by org.jscience.mathematics.algebraic.numbers.ComparableNumber<Float>
          extended by org.jscience.mathematics.algebraic.numbers.Float
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Float>, Field.Member, Ring.Member, AbelianGroup.Member, Member

public final class Float
extends ComparableNumber<Float>
implements java.lang.Cloneable, java.io.Serializable, Field.Member

The Float class encapsulates float numbers.

See Also:
Serialized Form

Field Summary
static float MAX_VALUE
          DOCUMENT ME!
static float MIN_VALUE
          DOCUMENT ME!
static float NaN
          DOCUMENT ME!
static float NEGATIVE_INFINITY
          DOCUMENT ME!
static Float ONE
          DOCUMENT ME!
static float POSITIVE_INFINITY
          DOCUMENT ME!
static java.lang.Class TYPE
          DOCUMENT ME!
static Float ZERO
          DOCUMENT ME!
 
Constructor Summary
Float(float num)
          Constructs a float number.
Float(Float num)
          Constructs a float number.
Float(int num)
          Constructs a float number.
Float(Integer num)
          Constructs a float number.
Float(long num)
          Constructs a float number.
Float(Long num)
          Constructs a float number.
Float(Rational num)
          Constructs a float number.
Float(java.lang.String s)
          Constructs the float number represented by a string.
 
Method Summary
 Float abs()
          Returns the abs of this number.
static Float acos(Float x)
          Returns the arc cosine of a number.
static Float acosh(Float x)
          Returns the arc hyperbolic cosine of a number.
 AbelianGroup.Member add(AbelianGroup.Member n)
          Returns the addition of this number and another.
 Float add(Float n)
          Returns the addition of this float number and another.
static Float asin(Float x)
          Returns the arc sine of a number.
static Float asinh(Float x)
          Returns the arc hyperbolic sine of a number.
static Float atan(Float x)
          Returns the arc tangent of a number.
static Float atanh(Float x)
          Returns the arc hyperbolic tangent of a number.
 java.lang.Object clone()
          DOCUMENT ME!
 int compareTo(ComparableNumber obj)
          Compares two comparable numbers.
 int compareTo(Float value)
          Compares two float numbers.
static Float cos(Float x)
          Returns the trigonometric cosine of an angle.
static Float cosh(Float x)
          Returns the hyperbolic cosine of a number.
 Field.Member divide(Field.Member n)
          Returns the division of this number and another.
 Float divide(Float n)
          Returns the division of this float number and another.
 double doubleValue()
          DOCUMENT ME!
 boolean equals(java.lang.Object obj)
          Compares two float numbers for equality.
static Float exp(Float x)
          Returns the exponential number e(2.718...) raised to the power of a number.
 float floatValue()
          DOCUMENT ME!
 Float getDistance(ComparableNumber n)
          DOCUMENT ME!
 Double getEpsilon()
          ‚±‚Ì•¡‘f?
 Float getNaN()
          DOCUMENT ME!
 Float getNegativeInfinity()
          DOCUMENT ME!
 Float getPositiveInfinity()
          DOCUMENT ME!
 int hashCode()
          Returns a hash code for this Float object.
 int intValue()
          DOCUMENT ME!
 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.
 boolean isNegativeInfinity()
          DOCUMENT ME!
 boolean isPositiveInfinity()
          DOCUMENT ME!
static Float log(Float x)
          Returns the natural logarithm (base e) of a number.
 long longValue()
          DOCUMENT ME!
 Float max(Float val)
          Returns the max of this number and another, according to compareTo rules.
 Float min(Float val)
          Returns the min of this number and another, according to compareTo rules.
 Float multiply(Float n)
          Returns the multiplication of this float 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.
 int signum()
          Returns the sign of this number.
static Float sin(Float x)
          Returns the trigonometric sine of an angle.
static Float sinh(Float x)
          Returns the hyperbolic sine of a number.
 AbelianGroup.Member subtract(AbelianGroup.Member n)
          Returns the subtraction of this number and another.
 Float subtract(Float n)
          Returns the subtraction of this float number and another.
static Float tan(Float x)
          Returns the trigonometric tangent of an angle.
static Float tanh(Float x)
          Returns the hyperbolic tangent of a number.
 java.lang.String toString()
          Returns a string representing the value of this float number.
 float value()
          Returns the float value.
 
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

ZERO

public static final Float ZERO
DOCUMENT ME!


ONE

public static final Float ONE
DOCUMENT ME!


MAX_VALUE

public static final float MAX_VALUE
DOCUMENT ME!

See Also:
Constant Field Values

MIN_VALUE

public static final float MIN_VALUE
DOCUMENT ME!

See Also:
Constant Field Values

NaN

public static final float NaN
DOCUMENT ME!

See Also:
Constant Field Values

NEGATIVE_INFINITY

public static final float NEGATIVE_INFINITY
DOCUMENT ME!

See Also:
Constant Field Values

POSITIVE_INFINITY

public static final float POSITIVE_INFINITY
DOCUMENT ME!

See Also:
Constant Field Values

TYPE

public static final java.lang.Class TYPE
DOCUMENT ME!

Constructor Detail

Float

public Float(float num)
Constructs a float number.


Float

public Float(long num)
Constructs a float number.


Float

public Float(int num)
Constructs a float number.


Float

public Float(Float num)
Constructs a float number.


Float

public Float(Rational num)
Constructs a float number.


Float

public Float(Long num)
Constructs a float number.


Float

public Float(Integer num)
Constructs a float number.


Float

public Float(java.lang.String s)
      throws java.lang.NumberFormatException
Constructs the float number represented by a string.

Parameters:
s - a string representing a float number.
Throws:
java.lang.NumberFormatException - if the string does not contain a parsable number.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares two float numbers for equality.

Overrides:
equals in class java.lang.Object
Parameters:
obj - a float number.
Returns:
DOCUMENT ME!

compareTo

public int compareTo(ComparableNumber obj)
              throws java.lang.IllegalArgumentException
Compares two comparable numbers.

Parameters:
obj - a number.
Returns:
a negative value if this<obj, zero if this==obj, and a positive value if this>obj.
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

compareTo

public int compareTo(Float value)
Compares two float numbers.

Specified by:
compareTo in interface java.lang.Comparable<Float>
Parameters:
value - a float number.
Returns:
a negative value if this<obj, zero if this==obj, and a positive value if this>obj.

toString

public java.lang.String toString()
Returns a string representing the value of this float number.

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!

value

public float value()
Returns the float value.

Returns:
DOCUMENT ME!

intValue

public int intValue()
DOCUMENT ME!

Specified by:
intValue in class java.lang.Number
Returns:
DOCUMENT ME!

longValue

public long longValue()
DOCUMENT ME!

Specified by:
longValue in class java.lang.Number
Returns:
DOCUMENT ME!

floatValue

public float floatValue()
DOCUMENT ME!

Specified by:
floatValue in class java.lang.Number
Returns:
DOCUMENT ME!

doubleValue

public double doubleValue()
DOCUMENT ME!

Specified by:
doubleValue in class java.lang.Number
Returns:
DOCUMENT ME!

abs

public Float abs()
Returns the abs of this number.

Returns:
DOCUMENT ME!

signum

public int signum()
Returns the sign of this number.

Returns:
DOCUMENT ME!

min

public Float min(Float val)
Returns the min of this number and another, according to compareTo rules.

Overrides:
min in class ComparableNumber<Float>
Parameters:
val - DOCUMENT ME!
Returns:
DOCUMENT ME!

max

public Float max(Float val)
Returns the max of this number and another, according to compareTo rules.

Overrides:
max in class ComparableNumber<Float>
Parameters:
val - DOCUMENT ME!
Returns:
DOCUMENT ME!

isNaN

public boolean isNaN()
Returns true if this number is NaN.

Specified by:
isNaN in class ComparableNumber<Float>
Returns:
DOCUMENT ME!

isInfinite

public boolean isInfinite()
Returns true if this number is infinite.

Specified by:
isInfinite in class ComparableNumber<Float>
Returns:
DOCUMENT ME!

isNegativeInfinity

public boolean isNegativeInfinity()
DOCUMENT ME!

Specified by:
isNegativeInfinity in class ComparableNumber<Float>
Returns:
DOCUMENT ME!

isPositiveInfinity

public boolean isPositiveInfinity()
DOCUMENT ME!

Specified by:
isPositiveInfinity in class ComparableNumber<Float>
Returns:
DOCUMENT ME!

getNaN

public Float getNaN()
DOCUMENT ME!

Specified by:
getNaN in class ComparableNumber<Float>
Returns:
DOCUMENT ME!

getNegativeInfinity

public Float getNegativeInfinity()
DOCUMENT ME!

Specified by:
getNegativeInfinity in class ComparableNumber<Float>
Returns:
DOCUMENT ME!

getPositiveInfinity

public Float getPositiveInfinity()
DOCUMENT ME!

Specified by:
getPositiveInfinity in class ComparableNumber<Float>
Returns:
DOCUMENT ME!

hashCode

public int hashCode()
Returns a hash code for this Float object.

Overrides:
hashCode in class java.lang.Object
Returns:
DOCUMENT ME!

getDistance

public Float getDistance(ComparableNumber n)
DOCUMENT ME!

Specified by:
getDistance in class ComparableNumber<Float>
Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!

negate

public AbelianGroup.Member negate()
Returns the negative of this number.

Specified by:
negate in interface AbelianGroup.Member
Returns:
DOCUMENT ME!

inverse

public Field.Member inverse()
Returns the inverse of this number.

Specified by:
inverse in interface Field.Member
Returns:
DOCUMENT ME!

add

public AbelianGroup.Member add(AbelianGroup.Member n)
Returns the addition of this number and another.

Specified by:
add in interface AbelianGroup.Member
Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

add

public Float add(Float n)
Returns the addition of this float number and another.

Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!

subtract

public AbelianGroup.Member subtract(AbelianGroup.Member n)
Returns the subtraction of this number and another.

Specified by:
subtract in interface AbelianGroup.Member
Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

subtract

public Float subtract(Float n)
Returns the subtraction of this float number and another.

Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!

multiply

public Ring.Member multiply(Ring.Member n)
Returns the multiplication of this number and another.

Specified by:
multiply in interface Ring.Member
Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

multiply

public Float multiply(Float n)
Returns the multiplication of this float number and another.

Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!

divide

public Field.Member divide(Field.Member n)
Returns the division of this number and another.

Specified by:
divide in interface Field.Member
Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

divide

public Float divide(Float n)
Returns the division of this float number and another.

Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!

exp

public static Float exp(Float x)
Returns the exponential number e(2.718...) raised to the power of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

log

public static Float log(Float x)
Returns the natural logarithm (base e) of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

sin

public static Float sin(Float x)
Returns the trigonometric sine of an angle.

Parameters:
x - an angle that is measured in radians
Returns:
DOCUMENT ME!

cos

public static Float cos(Float x)
Returns the trigonometric cosine of an angle.

Parameters:
x - an angle that is measured in radians
Returns:
DOCUMENT ME!

tan

public static Float tan(Float x)
Returns the trigonometric tangent of an angle.

Parameters:
x - an angle that is measured in radians
Returns:
DOCUMENT ME!

sinh

public static Float sinh(Float x)
Returns the hyperbolic sine of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

cosh

public static Float cosh(Float x)
Returns the hyperbolic cosine of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

tanh

public static Float tanh(Float x)
Returns the hyperbolic tangent of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

asin

public static Float asin(Float x)
Returns the arc sine of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

acos

public static Float acos(Float x)
Returns the arc cosine of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

atan

public static Float atan(Float x)
Returns the arc tangent of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

asinh

public static Float asinh(Float x)
Returns the arc hyperbolic sine of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

acosh

public static Float acosh(Float x)
Returns the arc hyperbolic cosine of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

atanh

public static Float atanh(Float x)
Returns the arc hyperbolic tangent of a number.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEpsilon

public final Double getEpsilon()
‚±‚Ì•¡‘f?�?‚Ì•„?†‚ɑΉž‚µ‚½?u•¡‘f?�?‚̊ۂߌë?·?v‚ð•Ô‚·?B

Returns:
‚±‚Ì•¡‘f?�?‚Ì•„?†‚ɑΉž‚µ‚½?u•¡‘f?�?‚̊ۂߌë?·?v

clone

public java.lang.Object clone()
DOCUMENT ME!

Overrides:
clone in class java.lang.Object
Returns:
DOCUMENT ME!