mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-22 19:15:29 +00:00
Avoid using higher precision floating point numbers by using it in a function
This commit is contained in:
parent
fbee0b86bf
commit
69a6efcd1b
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue