NEWS: Fix spelling mistake: "%ob" -> "%Ob".
[glibc.git] / include / float.h
blob7e65bb83cbe2aa775ab2b443e418d40ef3e8b74d
1 #ifndef _LIBC_FLOAT_H
2 #define _LIBC_FLOAT_H
4 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
5 #include <bits/libc-header-start.h>
7 #ifndef _ISOMAC
8 # define __STDC_WANT_IEC_60559_TYPES_EXT__
9 #endif
11 #include_next <float.h>
13 /* Supplement float.h macros for _FloatN and _FloatNx for older
14 compilers which do not yet support the type. These are described
15 in TS 18661-3. */
16 #include <features.h>
17 #include <bits/floatn.h>
18 #if !__GNUC_PREREQ (7, 0) && __GLIBC_USE (IEC_60559_TYPES_EXT)
20 # if __HAVE_FLOAT128
21 # define FLT128_MANT_DIG 113
22 # define FLT128_DECIMAL_DIG 36
23 # define FLT128_DIG 33
24 # define FLT128_MIN_EXP (-16381)
25 # define FLT128_MIN_10_EXP (-4931)
26 # define FLT128_MAX_EXP 16384
27 # define FLT128_MAX_10_EXP 4932
28 # define FLT128_MAX \
29 __f128 (1.18973149535723176508575932662800702e+4932)
30 # define FLT128_EPSILON \
31 __f128 (1.92592994438723585305597794258492732e-34)
32 # define FLT128_MIN \
33 __f128 (3.36210314311209350626267781732175260e-4932)
34 # define FLT128_TRUE_MIN \
35 __f128 (6.47517511943802511092443895822764655e-4966)
36 # endif
38 /* Types other than _Float128 are typedefs for other types with old
39 compilers. */
41 # if __HAVE_FLOAT32
42 # define FLT32_MANT_DIG FLT_MANT_DIG
43 # define FLT32_DECIMAL_DIG FLT_DECIMAL_DIG
44 # define FLT32_DIG FLT_DIG
45 # define FLT32_MIN_EXP FLT_MIN_EXP
46 # define FLT32_MIN_10_EXP FLT_MIN_10_EXP
47 # define FLT32_MAX_EXP FLT_MAX_EXP
48 # define FLT32_MAX_10_EXP FLT_MAX_10_EXP
49 # define FLT32_MAX FLT_MAX
50 # define FLT32_EPSILON FLT_EPSILON
51 # define FLT32_MIN FLT_MIN
52 # define FLT32_TRUE_MIN FLT_TRUE_MIN
53 # endif
55 # if __HAVE_FLOAT64
56 # define FLT64_MANT_DIG DBL_MANT_DIG
57 # define FLT64_DECIMAL_DIG DBL_DECIMAL_DIG
58 # define FLT64_DIG DBL_DIG
59 # define FLT64_MIN_EXP DBL_MIN_EXP
60 # define FLT64_MIN_10_EXP DBL_MIN_10_EXP
61 # define FLT64_MAX_EXP DBL_MAX_EXP
62 # define FLT64_MAX_10_EXP DBL_MAX_10_EXP
63 # define FLT64_MAX DBL_MAX
64 # define FLT64_EPSILON DBL_EPSILON
65 # define FLT64_MIN DBL_MIN
66 # define FLT64_TRUE_MIN DBL_TRUE_MIN
67 # endif
69 # if __HAVE_FLOAT32X
70 # define FLT32X_MANT_DIG DBL_MANT_DIG
71 # define FLT32X_DECIMAL_DIG DBL_DECIMAL_DIG
72 # define FLT32X_DIG DBL_DIG
73 # define FLT32X_MIN_EXP DBL_MIN_EXP
74 # define FLT32X_MIN_10_EXP DBL_MIN_10_EXP
75 # define FLT32X_MAX_EXP DBL_MAX_EXP
76 # define FLT32X_MAX_10_EXP DBL_MAX_10_EXP
77 # define FLT32X_MAX DBL_MAX
78 # define FLT32X_EPSILON DBL_EPSILON
79 # define FLT32X_MIN DBL_MIN
80 # define FLT32X_TRUE_MIN DBL_TRUE_MIN
81 # endif
83 # if __HAVE_FLOAT64X
84 # if __HAVE_FLOAT64X_LONG_DOUBLE
85 # define FLT64X_MANT_DIG LDBL_MANT_DIG
86 # define FLT64X_DECIMAL_DIG LDBL_DECIMAL_DIG
87 # define FLT64X_DIG LDBL_DIG
88 # define FLT64X_MIN_EXP LDBL_MIN_EXP
89 # define FLT64X_MIN_10_EXP LDBL_MIN_10_EXP
90 # define FLT64X_MAX_EXP LDBL_MAX_EXP
91 # define FLT64X_MAX_10_EXP LDBL_MAX_10_EXP
92 # define FLT64X_MAX LDBL_MAX
93 # define FLT64X_EPSILON LDBL_EPSILON
94 # define FLT64X_MIN LDBL_MIN
95 # define FLT64X_TRUE_MIN LDBL_TRUE_MIN
96 # else
97 # define FLT64X_MANT_DIG FLT128_MANT_DIG
98 # define FLT64X_DECIMAL_DIG FLT128_DECIMAL_DIG
99 # define FLT64X_DIG FLT128_DIG
100 # define FLT64X_MIN_EXP FLT128_MIN_EXP
101 # define FLT64X_MIN_10_EXP FLT128_MIN_10_EXP
102 # define FLT64X_MAX_EXP FLT128_MAX_EXP
103 # define FLT64X_MAX_10_EXP FLT128_MAX_10_EXP
104 # define FLT64X_MAX FLT128_MAX
105 # define FLT64X_EPSILON FLT128_EPSILON
106 # define FLT64X_MIN FLT128_MIN
107 # define FLT64X_TRUE_MIN FLT128_TRUE_MIN
108 # endif
109 # endif
111 #endif
113 #endif /* _LIBC_FLOAT_H */