This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: make check error



> 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

This works fine with RH7.0 and the doomed gcc2.96.  In fact,
adding a simple printf(" "); statement to the "volatile section"
of gsl_sf_multiply_impl() will cause the test to work correctly
(ie, return Underflow).  Using CFLAGS =-O0 when compiling
elementary.c will also successfully evaluate an Underflow.

Sorry I can't be of more help right now.

--Matt Newville

PS: And for the record, I'm usually for erring on the side of
    pedantic, and definitely in favor of holding on to that
    illusion of robustness and correctness.  Keep it up!




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]