diff options
author | Ting Shen <phoenixshen@google.com> | 2021-01-25 18:14:36 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-27 06:09:46 +0000 |
commit | 2b8e109ef452b5419f64262c895816245b3496f4 (patch) | |
tree | 47238fe0e0db2ad7e7935713709b6428eac13301 /test/charge_manager.tasklist | |
parent | e9af813c36b7b411bf2a01cbc1b09d5fdec49b8a (diff) | |
download | chrome-ec-2b8e109ef452b5419f64262c895816245b3496f4.tar.gz |
math_util: fix incorrect int_sqrtf implementation
Correct the binary search interval for small x.
The range should be at least [0, sqrt(2 ** 31)] ~= [0, 46341].
Also fixed some corner cases and added unit test for it.
BUG=b:177384512
TEST=1)`watch -n 0.3 ectool motionsense lid_angle`
verify the angle looks reasonable.
2) TEST_LIST_HOST=fp make runhosttests
BRANCH=main
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I394fe3a59ac51ec4491a24399848f179c1074b95
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2646041
Tested-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Yilin Yang (kerker) <kerker@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'test/charge_manager.tasklist')
0 files changed, 0 insertions, 0 deletions