Yo [email protected]!

On Sun, 09 Apr 2017 20:57:10 -0400
[email protected] wrote:

> In ntp_refclock.c function refclock_control near line 920 a test for a
> nonzero value is made with the time1 and time2 fudges, which raises
> float-equal warnings.

Yup.

> One way to fix this is to compare against DBL_MIN, but float.h would
> need to be included.

Yup.

> Comparing against LOGTOD(-31) will fail for any value less than ~0.2ns
> (the minimum l_fp fraction).

Yup.  Except the results is a constant, and having to compute a log
every time on a constant is a bit watesful.

> Comparing against S_PER_NS will fail for values less than 1ns.

Yup.  Or maybe S_PER_NS/10 in case the value might be rounded.

> I was going to submit a patch with LOGTOD() since it doesn't seem like
> a user would bother to put a fudge smaller than that, but I thought
> I'd ask first.

I agree, for most cases.  There are a few where 0.09 may be enough.

Start hacking, send a merge request or a patch.  We can interate to a
solution.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        [email protected]  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgpeNUkz0oH23.pgp
Description: OpenPGP digital signature

_______________________________________________
devel mailing list
[email protected]
http://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to