diff --git a/libs/libm/libm/lib_pow.c b/libs/libm/libm/lib_pow.c index 0177d2645461d..a395a4036ce20 100644 --- a/libs/libm/libm/lib_pow.c +++ b/libs/libm/libm/lib_pow.c @@ -41,11 +41,11 @@ #ifdef CONFIG_HAVE_DOUBLE double pow(double b, double e) { - if (b > 0) + if (b > 0.0) { return exp(e * log(b)); } - else if (b < 0 && e == (int)e) + else if (b < 0.0 && e == (int)e) { if ((int)e % 2 == 0) { @@ -57,6 +57,6 @@ double pow(double b, double e) } } - return 0; + return 0.0; } #endif diff --git a/libs/libm/libm/lib_powf.c b/libs/libm/libm/lib_powf.c index 60e7b33fb6954..e63ab640a5322 100644 --- a/libs/libm/libm/lib_powf.c +++ b/libs/libm/libm/lib_powf.c @@ -37,11 +37,11 @@ float powf(float b, float e) { - if (b > 0.0) + if (b > 0.0f) { return expf(e * logf(b)); } - else if (b < 0.0 && e == (int)e) + else if (b < 0.0f && e == (int)e) { if ((int)e % 2 == 0) { @@ -53,5 +53,5 @@ float powf(float b, float e) } } - return 0.0; + return 0.0f; }