[ntp:questions] Re: Tinker and tos configuration commands....

brad at shub-internet.org brad at shub-internet.org
Tue Feb 8 10:34:07 UTC 2005


"David L. Mills" <mills at udel.edu> wrote:

> One thing I try never to do is make a floating point variable into a
> state variable, with the exception of zero. In other words, 500 - 1 LSB
> is the same as 500 is the same sas 500 + 1 LSB. If you don't take that
> care, rounding can cause real trouble.

Even zero can be problematical in floating point, because there might be
both positive and negative representations of zero.  When doing floating
point comparisons, I learned long ago (in my Numerical Methods programming
class while I was still in college, almost twenty years back), you always
have to include a fudge factor to take care of the potential rounding
error.

In this case, the fudge factor is not being used at all within this part of
the code, so rounding errors would dominate over either the exclusive or
inclusive comparisons.

You are right that this issue should be taken up within the NTP working
group.

-- 
Brad Knowles, <brad at stop.mail-abuse.org>

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
    -Benjamin Franklin, Historical Review of Pennsylvania.

  SAGE member since 1995.  See <http://www.sage.org/> for more info.



More information about the questions mailing list