    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class JSci.maths.MathDouble

    java.lang.Object
       |
       +----JSci.maths.MathDouble

public final class MathDouble
extends Object
implements FieldMember, Serializable

The MathDouble class encapsulates double numbers.

##

MathDouble(double)
  Constructs a double number.
MathDouble(String)
  Constructs the double number represented by a string.

##

add(AbelianGroupMember)
  Returns the addition of this number and another.
add(MathDouble)
  Returns the addition of this double number and another.
divide(FieldMember)
  Returns the division of this number and another.
divide(MathDouble)
  Returns the division of this double number and another.
equals(Object)
  Compares two double numbers for equality.
inverse()
  Returns the inverse of this number.
isInfinite()
  Returns true if this number is infinite.
isNaN()
  Returns true if this number is NaN.
multiply(MathDouble)
  Returns the multiplication of this double number and another.
multiply(RingMember)
  Returns the multiplication of this number and another.
negate()
  Returns the negative of this number.
subtract(AbelianGroupMember)
  Returns the subtraction of this number and another.
subtract(MathDouble)
  Returns the subtraction of this double number and another.
toString()
  Returns a string representing the value of this double number.
value()
  Returns the double value.

##

MathDouble

     public MathDouble(double num)

  Constructs a double number.

MathDouble

     public MathDouble(String s) throws NumberFormatException

  Constructs the double number represented by a string.

  Parameters:
    s - a string representing a double number
  Throws: NumberFormatException
    if the string does not contain a parsable number.

##

equals

     public boolean equals(Object obj)

  Compares two double numbers for equality.

  Parameters:
    obj - a double number
  Overrides:
    equals in class Object

toString

     public String toString()

  Returns a string representing the value of this double number.

  Overrides:
    toString in class Object

value

     public double value()

  Returns the double value.

isNaN

     public boolean isNaN()

  Returns true if this number is NaN.

isInfinite

     public boolean isInfinite()

  Returns true if this number is infinite.

negate

     public AbelianGroupMember negate()

  Returns the negative of this number.

inverse

     public FieldMember inverse()

  Returns the inverse of this number.

add

     public AbelianGroupMember add(AbelianGroupMember n)

  Returns the addition of this number and another.

add

     public MathDouble add(MathDouble n)

  Returns the addition of this double number and another.

subtract

     public AbelianGroupMember subtract(AbelianGroupMember n)

  Returns the subtraction of this number and another.

subtract

     public MathDouble subtract(MathDouble n)

  Returns the subtraction of this double number and another.

multiply

     public RingMember multiply(RingMember n)

  Returns the multiplication of this number and another.

multiply

     public MathDouble multiply(MathDouble n)

  Returns the multiplication of this double number and another.

divide

     public FieldMember divide(FieldMember n)

  Returns the division of this number and another.

divide

     public MathDouble divide(MathDouble n)

  Returns the division of this double number and another.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index