All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prolog.math.FloNum

java.lang.Object
   |
   +----prolog.Term
           |
           +----prolog.math.Numeric
                   |
                   +----prolog.math.FloNum

public class FloNum
extends Numeric
Maths package for Prolog. A stripped and modified version of the gnu.math library, which has the following copyright:

Copyright (c) 1997 Per M.A. Bothner. This is free software; for terms and warranty disclaimer see ./COPYING.

FIXME: This is the floating-point class. (double precision).


Variable Index

 o value

Constructor Index

 o FloNum(double)

Method Index

 o add(Numeric)
Return this + k * obj.
 o compare(double, double)
 o compare(Numeric)
Return 1 if this>obj; 0 if this==obj; -1 if this<obj; -2 if either is NaN; -3 if not comparable (not equal).
 o div(Numeric)
 o doubleValue()
 o equals(Object)
 o hashCode()
Every Numeric subclass must provide a hashCode method such that numbers that are equal return the same hash.
 o isNegative()
 o isZero()
 o longValue()
 o mod(Numeric)
 o mul(Numeric)
 o neg()
 o normalise_copy(Variable[], int, Vector)
Copy a Term, instantiating variables from the array.
 o power(IntNum)
 o sign()
 o sub(Numeric)
 o toString()
Returns a representation of this object that may be used for debugging or database listings, etc.
 o toString(int)
 o typify(TypeDictionary, boolean)
Generate the type tree that describes this Term.

Variables

 o value
 double value

Constructors

 o FloNum
 public FloNum(double value)

Methods

 o normalise_copy
 public Term normalise_copy(Variable vars[],
                            int next_new_var,
                            Vector new_vars)
Copy a Term, instantiating variables from the array.

Overrides:
normalise_copy in class Term
 o typify
 public void typify(TypeDictionary types,
                    boolean map)
Generate the type tree that describes this Term.

Overrides:
typify in class Term
 o doubleValue
 public final double doubleValue()
Overrides:
doubleValue in class Numeric
 o longValue
 public long longValue()
Overrides:
longValue in class Numeric
 o hashCode
 public int hashCode()
Every Numeric subclass must provide a hashCode method such that numbers that are equal return the same hash.

Overrides:
hashCode in class Numeric
 o equals
 public boolean equals(Object obj)
Overrides:
equals in class Numeric
 o add
 public Numeric add(Numeric y)
Return this + k * obj.

Overrides:
add in class Numeric
 o sub
 public Numeric sub(Numeric y)
Overrides:
sub in class Numeric
 o mul
 public Numeric mul(Numeric y)
Overrides:
mul in class Numeric
 o div
 public Numeric div(Numeric y)
Overrides:
div in class Numeric
 o mod
 public Numeric mod(Numeric y)
Overrides:
mod in class Numeric
 o power
 public Numeric power(IntNum y)
 o isNegative
 public boolean isNegative()
Overrides:
isNegative in class Numeric
 o neg
 public Numeric neg()
Overrides:
neg in class Numeric
 o sign
 public int sign()
 o compare
 public static int compare(double x,
                           double y)
 o compare
 public int compare(Numeric n)
Return 1 if this>obj; 0 if this==obj; -1 if this<obj; -2 if either is NaN; -3 if not comparable (not equal).

Overrides:
compare in class Numeric
 o isZero
 public boolean isZero()
 o toString
 public String toString()
Returns a representation of this object that may be used for debugging or database listings, etc.

Overrides:
toString in class Numeric
 o toString
 public String toString(int radix)
Overrides:
toString in class Numeric

All Packages  Class Hierarchy  This Package  Previous  Next  Index