public class Numeric
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
PRECISION
Precision on the numeric operations.
|
Constructor and Description |
---|
Numeric() |
Modifier and Type | Method and Description |
---|---|
static double |
binsearch(DoubleFunc fun,
double a,
double start)
find inverse x of fun.F so that a = F(x),
where x>=0, and fun.F is monotonically increasing.
|
static double |
secant(DoubleFunc fun,
double a,
double x0,
double x1)
Computes the secant between the function and the numbers given.
|
public static double secant(DoubleFunc fun, double a, double x0, double x1)
fun
- function to compute with.a
- offset. number used to compute the y values of the evalution of x0 and x1 (yi = fun.F(x0)-a)x0
- first element given.x1
- second element given.public static double binsearch(DoubleFunc fun, double a, double start)
fun
- Function given.a
- offset. number used to compute the y values (y_start = fun.F(start)-a)start
- a starting point, >= 0.