Skip to content

Commit 37089cf

Browse files
aescolarfabiobaltieri
authored andcommitted
tests/c_lib/common/src/test_sqrt: Fix when double is not 64 bits
The combination of 3231269 74c9e7a broke this test, when __SIZEOF_DOUBLE__ != 8. In that case the test will fail to build, as the variables the code uses are left ifdef'ed out. Let's fix it. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
1 parent b5ca5b4 commit 37089cf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/lib/c_lib/common/src/test_sqrt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ static float test_floats[] = {
2929
};
3030
#define NUM_TEST_FLOATS (sizeof(test_floats)/sizeof(float))
3131

32-
#if __SIZEOF_DOUBLE__ == 8
33-
static double test_doubles[] = {
32+
static double test_doubles[] = {
3433
1.0, 2.0, 3.0, 4.0,
3534
5.0, 6.0, 7.0, 8.0, 9.0, /* numbers across the decade */
3635
3.14159265359, 2.718281828, /* irrational numbers pi and e */
@@ -60,7 +59,6 @@ static int isnan(double x)
6059
((ieee754.u & 0x000fffffffffffff) != 0);
6160
}
6261
#endif
63-
#endif /* __SIZEOF_DOUBLE__ == 8 */
6462

6563
#ifndef isinff
6664
static int isinff(float x)

0 commit comments

Comments
 (0)