diff --git a/lib/libc/minimal/source/math/sqrt.c b/lib/libc/minimal/source/math/sqrt.c index 07fc1eaeebd..48e3212312e 100644 --- a/lib/libc/minimal/source/math/sqrt.c +++ b/lib/libc/minimal/source/math/sqrt.c @@ -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) { diff --git a/lib/libc/minimal/source/math/sqrtf.c b/lib/libc/minimal/source/math/sqrtf.c index a3116e54701..673e54e1fb5 100644 --- a/lib/libc/minimal/source/math/sqrtf.c +++ b/lib/libc/minimal/source/math/sqrtf.c @@ -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) {