Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / common / sl_finite.c
blob9ec629018187a39e96ee40eed3cc2df671947550
1 /* Copyright (C) 2015 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
5 */
7 /* finitel(x) returns 1 is x is finite, else 0; */
9 #include <math.h>
11 int
12 finitel (long double x)
14 #ifdef _LDBL_EQ_DBL
15 return finite (x);
16 #else
17 /* Let the compiler do this for us.
18 Note - we do not know how many bits there are in a long double.
19 Some architectures for example have an 80-bit long double whereas
20 others use 128-bits. We use macros and comiler builtin functions
21 to avoid specific knowledge of the long double format. */
22 return __builtin_isfinite (x);
23 #endif