public final class NumericalPrecision
extends java.lang.Object
Constructor and Description |
---|
NumericalPrecision() |
Modifier and Type | Method and Description |
---|---|
static double |
defaultNumericalPrecision() |
static boolean |
equal(double a,
double b) |
static boolean |
equal(double a,
double b,
double precision) |
static double |
getLargestExponentialArgument() |
static double |
getLargestNumber()
(c) Copyrights Didier BESSET, 1999, all rights reserved.
|
static double |
getMachinePrecision() |
static double |
getNegativeMachinePrecision() |
static int |
getRadix() |
static double |
getSmallestNumber() |
static void |
printParameters(java.io.PrintStream printStream) |
static void |
reset() |
static double |
roundTo(double value,
double scale)
This method returns the specified value rounded to
the nearest integer multiple of the specified scale.
|
static double |
roundToScale(double value,
boolean integerValued)
Round the specified value upward to the next scale value.
|
static double |
smallNumber()
Returns the smallest number that the system can handle.
|
public static double defaultNumericalPrecision()
public static boolean equal(double a, double b)
a
- doubleb
- doublepublic static boolean equal(double a, double b, double precision)
a
- doubleb
- doubleprecision
- doublepublic static double getLargestExponentialArgument()
public static double getLargestNumber()
public static double getMachinePrecision()
public static double getNegativeMachinePrecision()
public static int getRadix()
public static double getSmallestNumber()
public static void printParameters(java.io.PrintStream printStream)
public static void reset()
public static double roundTo(double value, double scale)
value
- number to be roundedscale
- defining the rounding scalepublic static double roundToScale(double value, boolean integerValued)
value
- the value to be rounded.integerValued
- a flag specified whether integer scale are used, otherwise double scale is used.public static double smallNumber()