Can you try the program below to see if the wrong behavior of fabs()
is reproducible. If so, that is the problem.
#include <math.h>
#include <stdio.h>
int main()
{
double x, y;
x = DBL_MIN;
y = fabs(x);
printf("x= %e fabs(x)= %e\n", x, y);
}
$ ./a.out
x= 2.225074e-308 fabs(x)= 2.225074e-308