1#include "SDL_internal.h" 2/* 3 * Written by J.T. Conklin <[email protected]>. 4 * Changed to return -1 for -Inf by Ulrich Drepper <[email protected]>. 5 * Public domain. 6 */ 7 8/* 9 * isinf(x) returns 1 is x is inf, -1 if x is -inf, else 0; 10 * no branching! 11 */ 12 13#include "math.h" 14#include "math_private.h" 15 16int __isinf(double x) 17{ 18 int32_t hx,lx; 19 EXTRACT_WORDS(hx,lx,x); 20 lx |= (hx & 0x7fffffff) ^ 0x7ff00000; 21 lx |= -lx; 22 return ~(lx >> 31) & (hx >> 30); 23} 24libm_hidden_def(__isinf) 25 26