commit | 0a8e1ad972b984c9d1ec05dd3c3a353161917c9c | [log] [tgz] |
---|---|---|
author | Lars-Ove Karlsson <lars-ove.karlsson@iar.com> | Thu Sep 26 14:28:04 2024 +0200 |
committer | Fabio Baltieri <fabio.baltieri@gmail.com> | Mon Sep 30 17:12:43 2024 +0100 |
tree | a3704b608cd87e3eb82b0357eb7bdc9583482cdd | |
parent | 9ae8ebfadef412ed6981445988bbc05f1d23bba5 [diff] |
libc: minimal: math: Removed undefined behavior in sqrt routines The previous code used casts of address of int to float pointer. This is undefined behavior in C and may cause a compiler to optimize code incorrectly. I have replaced it with a union of int and float types, eliminating the cast problem. Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>