public class Constants extends Object
Modifier and Type | Field and Description |
---|---|
static double |
APERY
the Apery's constant
|
static double |
EPSILON
the default epsilon used in this library
|
static double |
EULER_MASCHERONI
the Euler-Mascheroni constant
|
static double |
GOLDEN_RATIO
the Golden ratio
|
static double |
MACH_EPS
the machine epsilon
This is the difference between 1 and the smallest exactly representable number greater than
1.
|
static int |
MACH_SCALE
the scale for the machine epsilon
|
static double |
PI_SQ
\(\pi^2\)
|
static double |
ROOT_2
\(\sqrt{2}\)
|
static double |
ROOT_2_PI
\(\sqrt{2\pi}\)
|
static double |
ROOT_PI
\(\sqrt{\pi}\)
|
Modifier and Type | Method and Description |
---|---|
static double |
unitRoundOff()
Get the default unit round off.
|
static double |
unitRoundOff(int base,
int precision)
Get the unit round off as defined in the reference.
|
public static final double MACH_EPS
public static final int MACH_SCALE
public static final double EPSILON
public static final double ROOT_2
public static final double ROOT_2_PI
public static final double ROOT_PI
public static final double PI_SQ
public static final double EULER_MASCHERONI
public static final double APERY
public static final double GOLDEN_RATIO
public static double unitRoundOff(int base, int precision)
base
- base, e.g., 10precision
- precision (number of digits)public static double unitRoundOff()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.