> Well, I'm wondering if testing a float on an exact zero is in
> principle the right thing to do. It seems as all sort of rounding
> errors are invited in that are very hard to track down.
> 
> Wouldn't it be better to have something like GSL_IEEE_TEST_ZERO( x ) with
> #define GSL_IEEE_TEST_ZERO(x)  ( (x < GSL_MIN_IEEE) && ( x> -GSL_MIN_IEEE) )

The test for exactly zero is correct - the function chop_small_elements
has the job of determining if the number is "really" zero, and if it
is it sets it to 0.0 so that test of == 0.0 will succeed. The problem
seems to be that the test in chop_small_elements is not finding the
zero element properly.


_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to