Big picture...

Gary E. Miller gem at rellim.com
Tue Apr 18 05:44:45 UTC 2017


Yo Hal!

On Mon, 17 Apr 2017 21:58:42 -0700
Hal Murray <hmurray at megapathdsl.net> wrote:

> gem at rellim.com said:
> > But, I see no point not to do the offsets as timespec's too.
> > Otherwise big time corrections need multiple jumps due to loss of
> > precision in the doubles for large 'gate' times.  And the time sve
> > in doubles is lost in the converting back and forth.  
> 
> [What's a "time sve"?  I can't find a typo that turns it into
> something useful.]

s/sve/saved/


> I think the code using doubles would be much easier to read.

Really?  You see a  big difference between these tow?

    double a,b,c;
    c = a + b

And:
    timespeec a, b, c;
    c - timespec_add(a, b);





> If we convert from an offset in l_fp to double, we get sub ns
> resolution for small offsets.

How do you start with two things in ns, subtract and get them now in sub-ns?

> How big an offset can a double hold with ns precision?  53 bits of ns
> is many seconds.  So anything but the first long jump will be OK.
> I'm happy with that.

Acceptable, not optimal.  And it leads to this converstaion on
precision which wastes hours every month for all time.  Just do it right
and be done with it.

I would consider using long double if you feel the need for floaring point.

> It might be in interesting experiment.  Set the time so that it is
> off as far as possible and we get the worst precision through a
> double.  Then start ntpd.  Compare that with the time starting off by
> 1000 seconds.

And when Eric changes step_systeim() so I can add tests for it that will
be one of the first tests.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170417/b49ea96f/attachment.bin>


More information about the devel mailing list