Re: [xml] XPath mod operator problems



Geert Kloosterman wrote:

This means epsilon should be variable, depending on the size of the
numbers being compared.  Am I correct?

You are right. Fortunately, we can handle this as follows (unless I've
made another error :)

  (1 - epsilon) A < B < (1 + epsilon) A

And in C

  #define DBL_EQUAL(a,b) ((((1.0 - DBL_EPSILON) * (a)) < (b)) && \
                          (((1.0 + DBL_EPSILON) * (a)) > (b)))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]