]> git.ipfire.org Git - thirdparty/chrony.git/commit
smooth: fix selection of 1st stage direction
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 12 Sep 2016 10:23:09 +0000 (12:23 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 21 Nov 2016 11:02:51 +0000 (12:02 +0100)
commit37d1467368e63e65823465aa5eedaa76aba3bece
treed7838288c0b3b4e034ff129fd5fdc3df5f38e5f4
parent1d9d19d76ba7952a86b8266e2cfdced114fca883
smooth: fix selection of 1st stage direction

When the smoothing process is updated with extremely small (e.g.
sub-nanosecond) values, both directions may give a negative length of
the 1st or 3rd stage due to numerical errors and the selection will fail
an in assertion. Rework the code to select the direction which gives a
smaller error.
smooth.c