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