From f5c89b3bd5d74849757fd5b4d1a300068522a3ca Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Fri, 6 Mar 2026 13:26:57 -0800 Subject: Initial commit --- SDL-3.2.8/src/libm/s_isinf.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 SDL-3.2.8/src/libm/s_isinf.c (limited to 'SDL-3.2.8/src/libm/s_isinf.c') diff --git a/SDL-3.2.8/src/libm/s_isinf.c b/SDL-3.2.8/src/libm/s_isinf.c new file mode 100644 index 0000000..9486b05 --- /dev/null +++ b/SDL-3.2.8/src/libm/s_isinf.c @@ -0,0 +1,24 @@ +#include "SDL_internal.h" +/* + * Written by J.T. Conklin . + * Changed to return -1 for -Inf by Ulrich Drepper . + * Public domain. + */ + +/* + * isinf(x) returns 1 is x is inf, -1 if x is -inf, else 0; + * no branching! + */ + +#include "math.h" +#include "math_private.h" + +int __isinf(double x) +{ + int32_t hx,lx; + EXTRACT_WORDS(hx,lx,x); + lx |= (hx & 0x7fffffff) ^ 0x7ff00000; + lx |= -lx; + return ~(lx >> 31) & (hx >> 30); +} +libm_hidden_def(__isinf) -- cgit v1.2.3