11 #ifndef _LIBCPP_SUPPORT_IBM_LIMITS_H
12 #define _LIBCPP_SUPPORT_IBM_LIMITS_H
14 #if !defined(_AIX) // Linux
17 static const unsigned int _QNAN_F = 0x7fc00000;
18 #define NANF (*((float *)(&_QNAN_F)))
19 static const unsigned int _QNAN_LDBL128[4] = {0x7ff80000, 0x0, 0x0, 0x0};
20 #define NANL (*((long double *)(&_QNAN_LDBL128)))
21 static const unsigned int _SNAN_F= 0x7f855555;
22 #define NANSF (*((float *)(&_SNAN_F)))
23 static const unsigned int _SNAN_D[2] = {0x7ff55555, 0x55555555};
24 #define NANS (*((double *)(&_SNAN_D)))
25 static const unsigned int _SNAN_LDBL128[4] = {0x7ff55555, 0x55555555, 0x0, 0x0};
26 #define NANSL (*((long double *)(&_SNAN_LDBL128)))
28 #define __builtin_huge_val() HUGE_VAL
29 #define __builtin_huge_valf() HUGE_VALF
30 #define __builtin_huge_vall() HUGE_VALL
31 #define __builtin_nan(__dummy) NAN
32 #define __builtin_nanf(__dummy) NANF
33 #define __builtin_nanl(__dummy) NANL
34 #define __builtin_nans(__dummy) NANS
35 #define __builtin_nansf(__dummy) NANSF
36 #define __builtin_nansl(__dummy) NANSL
43 #define __builtin_huge_val() HUGE_VAL //0x7ff0000000000000
44 #define __builtin_huge_valf() HUGE_VALF //0x7f800000
45 #define __builtin_huge_vall() HUGE_VALL //0x7ff0000000000000
46 #define __builtin_nan(__dummy) nan(__dummy) //0x7ff8000000000000
47 #define __builtin_nanf(__dummy) nanf(__dummy) // 0x7ff80000
48 #define __builtin_nanl(__dummy) nanl(__dummy) //0x7ff8000000000000
49 #define __builtin_nans(__dummy) DBL_SNAN //0x7ff5555555555555
50 #define __builtin_nansf(__dummy) FLT_SNAN //0x7f855555
51 #define __builtin_nansl(__dummy) DBL_SNAN //0x7ff5555555555555
53 #define __FLT_MANT_DIG__ FLT_MANT_DIG
54 #define __FLT_DIG__ FLT_DIG
55 #define __FLT_RADIX__ FLT_RADIX
56 #define __FLT_MIN_EXP__ FLT_MIN_EXP
57 #define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP
58 #define __FLT_MAX_EXP__ FLT_MAX_EXP
59 #define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP
60 #define __FLT_MIN__ FLT_MIN
61 #define __FLT_MAX__ FLT_MAX
62 #define __FLT_EPSILON__ FLT_EPSILON
64 #define __FLT_DENORM_MIN__ 1.40129846e-45F
66 #define __DBL_MANT_DIG__ DBL_MANT_DIG
67 #define __DBL_DIG__ DBL_DIG
68 #define __DBL_MIN_EXP__ DBL_MIN_EXP
69 #define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP
70 #define __DBL_MAX_EXP__ DBL_MAX_EXP
71 #define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP
72 #define __DBL_MIN__ DBL_MIN
73 #define __DBL_MAX__ DBL_MAX
74 #define __DBL_EPSILON__ DBL_EPSILON
76 #define __DBL_DENORM_MIN__ 4.9406564584124654e-324
78 #define __LDBL_MANT_DIG__ LDBL_MANT_DIG
79 #define __LDBL_DIG__ LDBL_DIG
80 #define __LDBL_MIN_EXP__ LDBL_MIN_EXP
81 #define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP
82 #define __LDBL_MAX_EXP__ LDBL_MAX_EXP
83 #define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP
84 #define __LDBL_MIN__ LDBL_MIN
85 #define __LDBL_MAX__ LDBL_MAX
86 #define __LDBL_EPSILON__ LDBL_EPSILON
89 #define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
91 #define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
95 #define __CHAR_BIT__ 8
99 #endif // _LIBCPP_SUPPORT_IBM_LIMITS_H