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.


Constructor Index

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

Method Index

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

Constructors

 o MathDouble
 public MathDouble(double num)
Constructs a double number.

 o 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.

Methods

 o equals
 public boolean equals(Object obj)
Compares two double numbers for equality.

Parameters:
obj - a double number
Overrides:
equals in class Object
 o toString
 public String toString()
Returns a string representing the value of this double number.

Overrides:
toString in class Object
 o value
 public double value()
Returns the double value.

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

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

 o negate
 public AbelianGroupMember negate()
Returns the negative of this number.

 o inverse
 public FieldMember inverse()
Returns the inverse of this number.

 o add
 public AbelianGroupMember add(AbelianGroupMember n)
Returns the addition of this number and another.

 o add
 public MathDouble add(MathDouble n)
Returns the addition of this double number and another.

 o subtract
 public AbelianGroupMember subtract(AbelianGroupMember n)
Returns the subtraction of this number and another.

 o subtract
 public MathDouble subtract(MathDouble n)
Returns the subtraction of this double number and another.

 o multiply
 public RingMember multiply(RingMember n)
Returns the multiplication of this number and another.

 o multiply
 public MathDouble multiply(MathDouble n)
Returns the multiplication of this double number and another.

 o divide
 public FieldMember divide(FieldMember n)
Returns the division of this number and another.

 o divide
 public MathDouble divide(MathDouble n)
Returns the division of this double number and another.


All Packages  Class Hierarchy  This Package  Previous  Next  Index