public abstract class Arithmetic extends Object
Modifier and Type | Field and Description |
---|---|
static double |
EPSILON_DOUBLE |
static float |
EPSILON_FLOAT |
Constructor and Description |
---|
Arithmetic() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isZero(double x)
Test for zero (double version).
|
static boolean |
isZero(float x)
Test for zero (float version).
|
static double |
mod(double a,
double b)
Non-integer version of modulus operator, with results identical to Mathematica.
|
static int |
mod(int a,
int b)
Integer version of modulus operator (as described in the book).
|
static double |
sqr(double x) |
static float |
sqr(float x) |
static int |
sqr(int x) |
public static final float EPSILON_FLOAT
public static final double EPSILON_DOUBLE
public Arithmetic()
public static int sqr(int x)
public static float sqr(float x)
public static double sqr(double x)
public static int mod(int a, int b)
a mod b
.
* Also see here.a
- dividendb
- divisora mod b
public static double mod(double a, double b)
a mod b
.
Also see here.a
- dividendb
- divisora mod b
public static boolean isZero(float x)
x
- quantity to be testedpublic static boolean isZero(double x)
x
- quantity to be testedCopyright © 2006–2017, Wilhelm Burger, Mark J. Burge (BSD 2-Clause Simplified License)