Atlas - s_isnanf.c
Home / ext / SDL / src / libm Lines: 1 | Size: 815 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1#include "SDL_internal.h" 2/* s_isnanf.c -- float version of s_isnan.c. 3 * Conversion to float by Ian Lance Taylor, Cygnus Support, [email protected]. 4 */ 5 6/* 7 * ==================================================== 8 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 9 * 10 * Developed at SunPro, a Sun Microsystems, Inc. business. 11 * Permission to use, copy, modify, and distribute this 12 * software is freely granted, provided that this notice 13 * is preserved. 14 * ==================================================== 15 */ 16 17/* 18 * isnanf(x) returns 1 is x is nan, else 0; 19 * no branching! 20 */ 21 22#include "math.h" 23#include "math_private.h" 24 25int __isnanf(float x) 26{ 27 int32_t ix; 28 GET_FLOAT_WORD(ix,x); 29 ix &= 0x7fffffff; 30 ix = 0x7f800000 - ix; 31 return (int)(((u_int32_t)(ix))>>31); 32} 33libm_hidden_def(__isnanf) 34[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.