libc: minimal: math: Removed undefined behavior in sqrt routines
Fixed a clang config warning. Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
This commit is contained in:
parent
0a8e1ad972
commit
8fceb6421f
2 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,7 @@ double sqrt(double square)
|
|||
int64double_t root;
|
||||
int64double_t last;
|
||||
int64double_t p_square;
|
||||
|
||||
p_square.d = square;
|
||||
|
||||
if (square == 0.0) {
|
||||
|
|
|
@ -27,6 +27,7 @@ float sqrtf(float square)
|
|||
intfloat_t root;
|
||||
intfloat_t last;
|
||||
intfloat_t p_square;
|
||||
|
||||
p_square.f = square;
|
||||
|
||||
if (square == 0.0f) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue