milos-linux/lib/math
Bruno Sobreira França 84ec093f55 lib/math: Add int_log test suite
This commit introduces KUnit tests for the intlog2 and intlog10
functions, which compute logarithms in base 2 and base 10, respectively.
The tests cover a range of inputs to ensure the correctness of these
functions across common and edge cases.

Signed-off-by: Bruno Sobreira França <brunofrancadevsec@gmail.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Rae Moar <rmoar@google.com>
Link: https://lore.kernel.org/r/20241202075545.3648096-3-davidgow@google.com
Signed-off-by: Kees Cook <kees@kernel.org>
2025-02-10 18:25:37 -08:00
..
tests lib/math: Add int_log test suite 2025-02-10 18:25:37 -08:00
cordic.c
div64.c mul_u64_u64_div_u64: basic sanity test 2024-09-01 20:43:22 -07:00
gcd.c
int_log.c lib/math/int_log: Replace LGPL-2.1-or-later boilerplate with SPDX identifier 2023-07-09 22:47:50 +01:00
int_pow.c
int_sqrt.c
Kconfig math: make RATIONAL tristate 2021-09-08 11:50:26 -07:00
lcm.c
Makefile lib: math: Move KUnit tests into tests/ subdir 2025-02-10 18:24:57 -08:00
prime_numbers.c lib/math: add missing MODULE_DESCRIPTION() macros 2024-06-04 17:40:07 +02:00
rational.c math: rational: add missing MODULE_DESCRIPTION() macro 2024-07-04 23:43:11 -07:00
reciprocal_div.c
test_div64.c lib/math/test_div64: add some edge cases relevant to __div64_const32() 2024-10-28 21:44:28 +00:00
test_mul_u64_u64_div_u64.c mul_u64_u64_div_u64: basic sanity test 2024-09-01 20:43:22 -07:00