End dist
This commit is contained in:
parent
f140ae9722
commit
6efd4f5786
20 changed files with 51 additions and 34 deletions
|
@ -3,11 +3,11 @@
|
|||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
int t2_solve (
|
||||
double t2_solve (
|
||||
double (*f) (double),
|
||||
double x, double h
|
||||
) {
|
||||
if (h < DBL_EPSILON)
|
||||
if (h < NUM_FPE)
|
||||
return DBL_MAX;
|
||||
return (f(x + h) - f(x - h)) / (2 * h);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue