From 69a6efcd1bc65e714d0aa228b092924c2c7576e1 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sat, 14 Oct 2023 04:38:35 +0200
Subject: [PATCH] Avoid using higher precision floating point numbers by using
it in a function
---
test/testautomation_math.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/testautomation_math.c b/test/testautomation_math.c
index 1d39eaa5feb8..1e643bd0a9cb 100644
--- a/test/testautomation_math.c
+++ b/test/testautomation_math.c
@@ -138,6 +138,8 @@ helper_ddtod(const char *func_name, dd_to_d_func func,
Uint32 i;
for (i = 0; i < cases_size; i++) {
const double result = func(cases[i].x_input, cases[i].y_input);
+ /* By using the result as input, the compiler is less likely to use higher precision floating point number */
+ (void)SDL_sin(result);
SDLTest_AssertCheck(result == cases[i].expected,
"%s(%f,%f), expected %f, got %f",
func_name,