zephyr/lib
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
..
acpi lib: acpi: added acpi support using acpica lib 2023-06-30 17:53:01 +03:00
cpp Kconfig: Tidy up dependants of NATIVE_APPLICATION 2023-07-05 07:01:19 -04:00
hash lib: hashmap: Move hash table files lib/hashmap 2023-03-02 12:03:07 -05:00
libc libc: minimal: math sqrt: sqrtf: fix numeric accuracy of sqrt and sqrtf. 2023-07-14 12:42:41 -04:00
open-amp open-amp: Fix compilation with cache enabled 2023-04-18 12:12:56 +02:00
os json: Fix 64-bit support 2023-06-29 21:03:48 +02:00
posix lib: posix: pthread_rwlock: Fix a racy issue 2023-07-12 09:25:26 +02:00
smf lib: smf: fix include 2022-05-25 11:14:18 +09:00
CMakeLists.txt lib: acpi: added acpi support using acpica lib 2023-06-30 17:53:01 +03:00
Kconfig lib: acpi: added acpi support using acpica lib 2023-06-30 17:53:01 +03:00