02-23-2023, 02:57 PM
(02-22-2023, 06:27 PM)SMcNeill Wrote:Code: (Select All)// EXP
double func_exp_single(double value) {
if (value <= 88.02969) {
return exp(value);
}
error(6);
return 0;
}
long double func_exp_float(long double value) {
if (value <= 709.782712893) {
return exp(value);
}
error(6);
return 0;
}
@SMcNeill
in this statement: if (value <= 709.782712893)
what if value is -11356 for example?
I think that it needs to be something like the following
Code: (Select All)
long double func_exp_float(long double value) {
if (fabsl(value) <= 11355) {
return exp(value);
}
error(6);
return 0;
}