org.openmali.number
Class RadicandBounds

java.lang.Object
  extended by org.openmali.number.RadicandBounds

public class RadicandBounds
extends java.lang.Object

This class stores a cache of known (inclusive) rational bounds for sqrt radicands. We keep a cache becuase we don't expect a program to have that many different options of radicands used. NOT IMPLEMENTED: improving bounds at runtime using bisection methodology


Field Summary
static java.util.HashMap<java.lang.Integer,Rational> lowerBounds
           
static int PRECISION
           
static Rational tmp1
           
static Rational tmp2
           
static java.util.HashMap<java.lang.Integer,Rational> upperBounds
           
 
Constructor Summary
RadicandBounds()
           
 
Method Summary
static void getBounds(java.lang.Integer radicand, Rational upperPassback, Rational lowerPassback)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

upperBounds

public static java.util.HashMap<java.lang.Integer,Rational> upperBounds

lowerBounds

public static java.util.HashMap<java.lang.Integer,Rational> lowerBounds

tmp1

public static final Rational tmp1

tmp2

public static final Rational tmp2

PRECISION

public static final int PRECISION
See Also:
Constant Field Values
Constructor Detail

RadicandBounds

public RadicandBounds()
Method Detail

getBounds

public static void getBounds(java.lang.Integer radicand,
                             Rational upperPassback,
                             Rational lowerPassback)

main

public static void main(java.lang.String[] args)