This commit is contained in:
AZEN-SGG 2025-05-11 17:02:30 +03:00
parent f140ae9722
commit 6efd4f5786
20 changed files with 51 additions and 34 deletions

View file

@ -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);
}