At Thu, 16 Aug 2007 10:44:22 -0400,
Karl Edler wrote:
> I believe that intrinsic to the algorithm in gsl_fcmp is that it is not
> a reasonable thing to write something like gsl_fcmp(1e-16,0.0,1e-13) and
> expect to receive a 0 indicating that 1e-16 is approximately 0.0.
> 
> (|u-v|<=|u|*e and |u-v|<=|v|*e )cannot be true if either u is 0.0 and e
> and v are not.
> 
> I was hung up for a moment on this point and think that the gsl
> documentation for gsl_fcmp should address this point so that novice gsl
> programmers don't make the same mistake.

Hello,

Thanks for the suggestion.  I have added the following note to the
documentation:

  Note that @math{x} and @math{y} are compared to relative accuracy, so
  this function is not suitable for testing whether a value is
  approximately zero. 

-- 
Brian Gough
(GSL Maintainer)

Network Theory Ltd,
Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/


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

Reply via email to