diff options
| author | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
| commit | 5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch) | |
| tree | 8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/src/libm/s_isnanf.c | |
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/src/libm/s_isnanf.c')
| -rw-r--r-- | contrib/SDL-3.2.8/src/libm/s_isnanf.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/libm/s_isnanf.c b/contrib/SDL-3.2.8/src/libm/s_isnanf.c new file mode 100644 index 0000000..1cb308c --- /dev/null +++ b/contrib/SDL-3.2.8/src/libm/s_isnanf.c | |||
| @@ -0,0 +1,33 @@ | |||
| 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, ian@cygnus.com. | ||
| 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 | |||
| 25 | int __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 | } | ||
| 33 | libm_hidden_def(__isnanf) | ||
