Hi,
it seems gsl_sf_exp can't handle large negative arguments:
#include <stdio.h>
#include <math.h>
#include <gsl/gsl_sf.h>
int main(void)
{
double a = 1125000.0;
double b = 0.0, c = 0.0;
b = exp(-a);
printf("b: %f\n", b);
c = gsl_sf_exp(-a);
printf("c: %f\n", c);
return 0;
}
Output:
b: 0.000000
gsl: exp.c:114: ERROR: underflow
Default GSL error handler invoked.
Aborted
system: Debian unstable (with gsl 1.6.92)
Please CC me, I'm not subscribed to the list
Regards
Thomas
_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl