Commit f851d2a6 authored by Ryan McClelland's avatar Ryan McClelland Committed by Chris Friedt
Browse files

tests: lib: c_lib: fix test_sqrt double promotion warnings



Double promotion warnings are generated with the flag -Wdouble-promotion
Exponent was defined as a float, but was really be used a double here
Change the type of exponent in sqrt from float to double.

Signed-off-by: default avatarRyan McClelland <ryanmcclelland@meta.com>
parent d24880e3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -167,8 +167,7 @@ int32_t *p_root_squared = (int32_t *)&root_squared;
ZTEST(test_c_lib, test_sqrt)
{
int i;
float	exponent;
double	resd, error, square, root_squared;
double	resd, error, square, root_squared, exponent;
uint64_t max_error;
int64_t ierror;
int64_t *p_square = (int64_t *)&square;