From 5a079a2d114f96d4847d1ee305d5b7c16eeec50e Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 27 Dec 2025 12:03:39 -0800 Subject: Initial commit --- contrib/SDL-3.2.8/src/libm/s_isinf.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 contrib/SDL-3.2.8/src/libm/s_isinf.c (limited to 'contrib/SDL-3.2.8/src/libm/s_isinf.c') diff --git a/contrib/SDL-3.2.8/src/libm/s_isinf.c b/contrib/SDL-3.2.8/src/libm/s_isinf.c new file mode 100644 index 0000000..9486b05 --- /dev/null +++ b/contrib/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