zephyr/lib/libc
Lawrence King 7dae27a90d libc: minimal: math sqrt: sqrtf: fix numeric accuracy of sqrt and sqrtf.
Changed initial guess from a simple x/3 to dividing the exponent by 2.
This makes large or small numbers like 10e10 and 01e-10 converge in a few
loops.

Added a loop counter to ensure that the algorithm breaks out of the loop in
the case that the algorithm doesn't converge (toggling between two
numbers).

Added test cases for sqrt and sqrtf in libc. Tested with a range of numbers
between 10e10 and 10e-10. Verify good accuracy in test case.

Closes: #55962

Signed-off-by: Lawrence King <lawrencek52@gmail.com>
2023-07-14 12:42:41 -04:00
..
arcmwdt ARC: Fix portability.posix.common.arcmwdtlib test 2023-06-09 14:17:50 -04:00
armstdc libc: Move strnlen into common 2023-05-08 09:59:27 +02:00
common libC COMMON_LIBC_MALLOC_ARENA_SIZE: provide default for POSIX ARCH 2023-06-22 17:16:17 -04:00
minimal libc: minimal: math sqrt: sqrtf: fix numeric accuracy of sqrt and sqrtf. 2023-07-14 12:42:41 -04:00
newlib init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
picolibc libc/picolibc: Use mutexes instead of semaphores for non-recursive locks 2023-07-10 15:11:15 +02:00
CMakeLists.txt lib: syscalls: use zephyr_syscall_header 2023-06-17 07:57:45 -04:00
Kconfig libC: PICOLIBC_SUPPORTED: Enable for NATIVE_LIBRARY 2023-07-05 07:01:19 -04:00