The test was failing (in a flaky fashion, interestingly), comparing:
* 50.5 whose mantissa is:
1001010000000000000000000000000000000000000000000000
* with 50.500000000000036 whose mantissa is:
1001010000000000000000000000000000000000000000000101
since EXPECT_DOUBLE_EQ() only allows 4 ULPs difference.
We don't need this kind of precision.
Bug: webrtc:11134
Change-Id: I811178b0762dbcd61d4f2d3f047ea0b59847fa57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165761
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30230}
This CL implements Welford's algorithm for a
numerically stable computation of the variance.
This implementation is plugged in SamplesStatsCounter class (adapter pattern).
A 'NumericalStability' unit test has been added,
whose previous implementation of SamplesStatsCounter failed to pass.
Follow-up CLs will factorize more occurences of duplicated and misbehaved
computations.
Bug: webrtc:10412
Change-Id: Id807c3d34e9c780fb1cbd769d30b655c575c88ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131394
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27547}