2nd_Sem_Bogachev/2025.04.18/07Ex/contin_func.c
2025-04-18 00:41:17 +03:00

21 lines
266 B
C

#include "contin_func.h"
#include <math.h>
#include <float.h>
double sexp (const double x, const double eps)
{
double value = 1;
double monom = x;
int i = 1;
while (monom - eps >= DBL_EPSILON)
{
value += monom;
i++;
monom *= x/i;
}
return value;
}