source: Daodan/MSYS2/mingw32/lib/gcc/i686-w64-mingw32/11.2.0/include/float.h@ 1174

Last change on this file since 1174 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 20.2 KB
Line 
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
2
3This file is part of GCC.
4
5GCC is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation; either version 3, or (at your option)
8any later version.
9
10GCC is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15Under Section 7 of GPL version 3, you are granted additional
16permissions described in the GCC Runtime Library Exception, version
173.1, as published by the Free Software Foundation.
18
19You should have received a copy of the GNU General Public License and
20a copy of the GCC Runtime Library Exception along with this program;
21see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22<http://www.gnu.org/licenses/>. */
23
24/*
25 * ISO C Standard: 5.2.4.2.2 Characteristics of floating types <float.h>
26 */
27
28#ifndef _FLOAT_H___
29#define _FLOAT_H___
30
31/* Radix of exponent representation, b. */
32#undef FLT_RADIX
33#define FLT_RADIX __FLT_RADIX__
34
35/* Number of base-FLT_RADIX digits in the significand, p. */
36#undef FLT_MANT_DIG
37#undef DBL_MANT_DIG
38#undef LDBL_MANT_DIG
39#define FLT_MANT_DIG __FLT_MANT_DIG__
40#define DBL_MANT_DIG __DBL_MANT_DIG__
41#define LDBL_MANT_DIG __LDBL_MANT_DIG__
42
43/* Number of decimal digits, q, such that any floating-point number with q
44 decimal digits can be rounded into a floating-point number with p radix b
45 digits and back again without change to the q decimal digits,
46
47 p * log10(b) if b is a power of 10
48 floor((p - 1) * log10(b)) otherwise
49*/
50#undef FLT_DIG
51#undef DBL_DIG
52#undef LDBL_DIG
53#define FLT_DIG __FLT_DIG__
54#define DBL_DIG __DBL_DIG__
55#define LDBL_DIG __LDBL_DIG__
56
57/* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */
58#undef FLT_MIN_EXP
59#undef DBL_MIN_EXP
60#undef LDBL_MIN_EXP
61#define FLT_MIN_EXP __FLT_MIN_EXP__
62#define DBL_MIN_EXP __DBL_MIN_EXP__
63#define LDBL_MIN_EXP __LDBL_MIN_EXP__
64
65/* Minimum negative integer such that 10 raised to that power is in the
66 range of normalized floating-point numbers,
67
68 ceil(log10(b) * (emin - 1))
69*/
70#undef FLT_MIN_10_EXP
71#undef DBL_MIN_10_EXP
72#undef LDBL_MIN_10_EXP
73#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
74#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
75#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
76
77/* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */
78#undef FLT_MAX_EXP
79#undef DBL_MAX_EXP
80#undef LDBL_MAX_EXP
81#define FLT_MAX_EXP __FLT_MAX_EXP__
82#define DBL_MAX_EXP __DBL_MAX_EXP__
83#define LDBL_MAX_EXP __LDBL_MAX_EXP__
84
85/* Maximum integer such that 10 raised to that power is in the range of
86 representable finite floating-point numbers,
87
88 floor(log10((1 - b**-p) * b**emax))
89*/
90#undef FLT_MAX_10_EXP
91#undef DBL_MAX_10_EXP
92#undef LDBL_MAX_10_EXP
93#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
94#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
95#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
96
97/* Maximum representable finite floating-point number,
98
99 (1 - b**-p) * b**emax
100*/
101#undef FLT_MAX
102#undef DBL_MAX
103#undef LDBL_MAX
104#define FLT_MAX __FLT_MAX__
105#define DBL_MAX __DBL_MAX__
106#define LDBL_MAX __LDBL_MAX__
107
108/* The difference between 1 and the least value greater than 1 that is
109 representable in the given floating point type, b**1-p. */
110#undef FLT_EPSILON
111#undef DBL_EPSILON
112#undef LDBL_EPSILON
113#define FLT_EPSILON __FLT_EPSILON__
114#define DBL_EPSILON __DBL_EPSILON__
115#define LDBL_EPSILON __LDBL_EPSILON__
116
117/* Minimum normalized positive floating-point number, b**(emin - 1). */
118#undef FLT_MIN
119#undef DBL_MIN
120#undef LDBL_MIN
121#define FLT_MIN __FLT_MIN__
122#define DBL_MIN __DBL_MIN__
123#define LDBL_MIN __LDBL_MIN__
124
125/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */
126/* ??? This is supposed to change with calls to fesetround in <fenv.h>. */
127#undef FLT_ROUNDS
128#define FLT_ROUNDS 1
129
130#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
131 || (defined (__cplusplus) && __cplusplus >= 201103L)
132/* The floating-point expression evaluation method. The precise
133 definitions of these values are generalised to include support for
134 the interchange and extended types defined in ISO/IEC TS 18661-3.
135 Prior to this (for C99/C11) the definitions were:
136
137 -1 indeterminate
138 0 evaluate all operations and constants just to the range and
139 precision of the type
140 1 evaluate operations and constants of type float and double
141 to the range and precision of the double type, evaluate
142 long double operations and constants to the range and
143 precision of the long double type
144 2 evaluate all operations and constants to the range and
145 precision of the long double type
146
147 The TS 18661-3 definitions are:
148
149 -1 indeterminate
150 0 evaluate all operations and constants, whose semantic type has
151 at most the range and precision of float, to the range and
152 precision of float; evaluate all other operations and constants
153 to the range and precision of the semantic type.
154 1 evaluate all operations and constants, whose semantic type has
155 at most the range and precision of double, to the range and
156 precision of double; evaluate all other operations and constants
157 to the range and precision of the semantic type.
158 2 evaluate all operations and constants, whose semantic type has
159 at most the range and precision of long double, to the range and
160 precision of long double; evaluate all other operations and
161 constants to the range and precision of the semantic type.
162 N where _FloatN is a supported interchange floating type
163 evaluate all operations and constants, whose semantic type has
164 at most the range and precision of the _FloatN type, to the
165 range and precision of the _FloatN type; evaluate all other
166 operations and constants to the range and precision of the
167 semantic type.
168 N + 1, where _FloatNx is a supported extended floating type
169 evaluate operations and constants, whose semantic type has at
170 most the range and precision of the _FloatNx type, to the range
171 and precision of the _FloatNx type; evaluate all other
172 operations and constants to the range and precision of the
173 semantic type.
174
175 The compiler predefines two macros:
176
177 __FLT_EVAL_METHOD__
178 Which, depending on the value given for
179 -fpermitted-flt-eval-methods, may be limited to only those values
180 for FLT_EVAL_METHOD defined in C99/C11.
181
182 __FLT_EVAL_METHOD_TS_18661_3__
183 Which always permits the values for FLT_EVAL_METHOD defined in
184 ISO/IEC TS 18661-3.
185
186 Here we want to use __FLT_EVAL_METHOD__, unless
187 __STDC_WANT_IEC_60559_TYPES_EXT__ is defined, in which case the user
188 is specifically asking for the ISO/IEC TS 18661-3 types, so we use
189 __FLT_EVAL_METHOD_TS_18661_3__.
190
191 ??? This ought to change with the setting of the fp control word;
192 the value provided by the compiler assumes the widest setting. */
193#undef FLT_EVAL_METHOD
194#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
195#define FLT_EVAL_METHOD __FLT_EVAL_METHOD_TS_18661_3__
196#else
197#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
198#endif
199
200/* Number of decimal digits, n, such that any floating-point number in the
201 widest supported floating type with pmax radix b digits can be rounded
202 to a floating-point number with n decimal digits and back again without
203 change to the value,
204
205 pmax * log10(b) if b is a power of 10
206 ceil(1 + pmax * log10(b)) otherwise
207*/
208#undef DECIMAL_DIG
209#define DECIMAL_DIG __DECIMAL_DIG__
210
211#endif /* C99 */
212
213#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \
214 || (defined (__cplusplus) && __cplusplus >= 201703L)
215/* Versions of DECIMAL_DIG for each floating-point type. */
216#undef FLT_DECIMAL_DIG
217#undef DBL_DECIMAL_DIG
218#undef LDBL_DECIMAL_DIG
219#define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
220#define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
221#define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__
222
223/* Whether types support subnormal numbers. */
224#undef FLT_HAS_SUBNORM
225#undef DBL_HAS_SUBNORM
226#undef LDBL_HAS_SUBNORM
227#define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
228#define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
229#define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
230
231/* Minimum positive values, including subnormals. */
232#undef FLT_TRUE_MIN
233#undef DBL_TRUE_MIN
234#undef LDBL_TRUE_MIN
235#define FLT_TRUE_MIN __FLT_DENORM_MIN__
236#define DBL_TRUE_MIN __DBL_DENORM_MIN__
237#define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
238
239#endif /* C11 */
240
241#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
242/* Maximum finite positive value with MANT_DIG digits in the
243 significand taking their maximum value. */
244#undef FLT_NORM_MAX
245#undef DBL_NORM_MAX
246#undef LDBL_NORM_MAX
247#define FLT_NORM_MAX __FLT_NORM_MAX__
248#define DBL_NORM_MAX __DBL_NORM_MAX__
249#define LDBL_NORM_MAX __LDBL_NORM_MAX__
250
251/* Whether each type matches an IEC 60559 format (1 for format, 2 for
252 format and operations). */
253#undef FLT_IS_IEC_60559
254#undef DBL_IS_IEC_60559
255#undef LDBL_IS_IEC_60559
256#define FLT_IS_IEC_60559 __FLT_IS_IEC_60559__
257#define DBL_IS_IEC_60559 __DBL_IS_IEC_60559__
258#define LDBL_IS_IEC_60559 __LDBL_IS_IEC_60559__
259
260/* Infinity in type float, or overflow if infinity not supported. */
261#undef INFINITY
262#define INFINITY (__builtin_inff ())
263
264/* Quiet NaN, if supported for float. */
265#if __FLT_HAS_QUIET_NAN__
266#undef NAN
267#define NAN (__builtin_nanf (""))
268#endif
269
270/* Signaling NaN, if supported for each type. All formats supported
271 by GCC support either both quiet and signaling NaNs, or neither
272 kind of NaN. */
273#if __FLT_HAS_QUIET_NAN__
274#undef FLT_SNAN
275#define FLT_SNAN (__builtin_nansf (""))
276#endif
277#if __DBL_HAS_QUIET_NAN__
278#undef DBL_SNAN
279#define DBL_SNAN (__builtin_nans (""))
280#endif
281#if __LDBL_HAS_QUIET_NAN__
282#undef LDBL_SNAN
283#define LDBL_SNAN (__builtin_nansl (""))
284#endif
285
286#endif /* C2X */
287
288#if (defined __STDC_WANT_IEC_60559_BFP_EXT__ \
289 || defined __STDC_WANT_IEC_60559_EXT__)
290/* Number of decimal digits for which conversions between decimal
291 character strings and binary formats, in both directions, are
292 correctly rounded. */
293#define CR_DECIMAL_DIG __UINTMAX_MAX__
294#endif
295
296#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
297/* Constants for _FloatN and _FloatNx types from TS 18661-3. See
298 comments above for their semantics. */
299
300#ifdef __FLT16_MANT_DIG__
301#undef FLT16_MANT_DIG
302#define FLT16_MANT_DIG __FLT16_MANT_DIG__
303#undef FLT16_DIG
304#define FLT16_DIG __FLT16_DIG__
305#undef FLT16_MIN_EXP
306#define FLT16_MIN_EXP __FLT16_MIN_EXP__
307#undef FLT16_MIN_10_EXP
308#define FLT16_MIN_10_EXP __FLT16_MIN_10_EXP__
309#undef FLT16_MAX_EXP
310#define FLT16_MAX_EXP __FLT16_MAX_EXP__
311#undef FLT16_MAX_10_EXP
312#define FLT16_MAX_10_EXP __FLT16_MAX_10_EXP__
313#undef FLT16_MAX
314#define FLT16_MAX __FLT16_MAX__
315#undef FLT16_EPSILON
316#define FLT16_EPSILON __FLT16_EPSILON__
317#undef FLT16_MIN
318#define FLT16_MIN __FLT16_MIN__
319#undef FLT16_DECIMAL_DIG
320#define FLT16_DECIMAL_DIG __FLT16_DECIMAL_DIG__
321#undef FLT16_TRUE_MIN
322#define FLT16_TRUE_MIN __FLT16_DENORM_MIN__
323#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
324#undef FLT16_SNAN
325#define FLT16_SNAN (__builtin_nansf16 (""))
326#endif /* C2X */
327#endif /* __FLT16_MANT_DIG__. */
328
329#ifdef __FLT32_MANT_DIG__
330#undef FLT32_MANT_DIG
331#define FLT32_MANT_DIG __FLT32_MANT_DIG__
332#undef FLT32_DIG
333#define FLT32_DIG __FLT32_DIG__
334#undef FLT32_MIN_EXP
335#define FLT32_MIN_EXP __FLT32_MIN_EXP__
336#undef FLT32_MIN_10_EXP
337#define FLT32_MIN_10_EXP __FLT32_MIN_10_EXP__
338#undef FLT32_MAX_EXP
339#define FLT32_MAX_EXP __FLT32_MAX_EXP__
340#undef FLT32_MAX_10_EXP
341#define FLT32_MAX_10_EXP __FLT32_MAX_10_EXP__
342#undef FLT32_MAX
343#define FLT32_MAX __FLT32_MAX__
344#undef FLT32_EPSILON
345#define FLT32_EPSILON __FLT32_EPSILON__
346#undef FLT32_MIN
347#define FLT32_MIN __FLT32_MIN__
348#undef FLT32_DECIMAL_DIG
349#define FLT32_DECIMAL_DIG __FLT32_DECIMAL_DIG__
350#undef FLT32_TRUE_MIN
351#define FLT32_TRUE_MIN __FLT32_DENORM_MIN__
352#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
353#undef FLT32_SNAN
354#define FLT32_SNAN (__builtin_nansf32 (""))
355#endif /* C2X */
356#endif /* __FLT32_MANT_DIG__. */
357
358#ifdef __FLT64_MANT_DIG__
359#undef FLT64_MANT_DIG
360#define FLT64_MANT_DIG __FLT64_MANT_DIG__
361#undef FLT64_DIG
362#define FLT64_DIG __FLT64_DIG__
363#undef FLT64_MIN_EXP
364#define FLT64_MIN_EXP __FLT64_MIN_EXP__
365#undef FLT64_MIN_10_EXP
366#define FLT64_MIN_10_EXP __FLT64_MIN_10_EXP__
367#undef FLT64_MAX_EXP
368#define FLT64_MAX_EXP __FLT64_MAX_EXP__
369#undef FLT64_MAX_10_EXP
370#define FLT64_MAX_10_EXP __FLT64_MAX_10_EXP__
371#undef FLT64_MAX
372#define FLT64_MAX __FLT64_MAX__
373#undef FLT64_EPSILON
374#define FLT64_EPSILON __FLT64_EPSILON__
375#undef FLT64_MIN
376#define FLT64_MIN __FLT64_MIN__
377#undef FLT64_DECIMAL_DIG
378#define FLT64_DECIMAL_DIG __FLT64_DECIMAL_DIG__
379#undef FLT64_TRUE_MIN
380#define FLT64_TRUE_MIN __FLT64_DENORM_MIN__
381#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
382#undef FLT64_SNAN
383#define FLT64_SNAN (__builtin_nansf64 (""))
384#endif /* C2X */
385#endif /* __FLT64_MANT_DIG__. */
386
387#ifdef __FLT128_MANT_DIG__
388#undef FLT128_MANT_DIG
389#define FLT128_MANT_DIG __FLT128_MANT_DIG__
390#undef FLT128_DIG
391#define FLT128_DIG __FLT128_DIG__
392#undef FLT128_MIN_EXP
393#define FLT128_MIN_EXP __FLT128_MIN_EXP__
394#undef FLT128_MIN_10_EXP
395#define FLT128_MIN_10_EXP __FLT128_MIN_10_EXP__
396#undef FLT128_MAX_EXP
397#define FLT128_MAX_EXP __FLT128_MAX_EXP__
398#undef FLT128_MAX_10_EXP
399#define FLT128_MAX_10_EXP __FLT128_MAX_10_EXP__
400#undef FLT128_MAX
401#define FLT128_MAX __FLT128_MAX__
402#undef FLT128_EPSILON
403#define FLT128_EPSILON __FLT128_EPSILON__
404#undef FLT128_MIN
405#define FLT128_MIN __FLT128_MIN__
406#undef FLT128_DECIMAL_DIG
407#define FLT128_DECIMAL_DIG __FLT128_DECIMAL_DIG__
408#undef FLT128_TRUE_MIN
409#define FLT128_TRUE_MIN __FLT128_DENORM_MIN__
410#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
411#undef FLT128_SNAN
412#define FLT128_SNAN (__builtin_nansf128 (""))
413#endif /* C2X */
414#endif /* __FLT128_MANT_DIG__. */
415
416#ifdef __FLT32X_MANT_DIG__
417#undef FLT32X_MANT_DIG
418#define FLT32X_MANT_DIG __FLT32X_MANT_DIG__
419#undef FLT32X_DIG
420#define FLT32X_DIG __FLT32X_DIG__
421#undef FLT32X_MIN_EXP
422#define FLT32X_MIN_EXP __FLT32X_MIN_EXP__
423#undef FLT32X_MIN_10_EXP
424#define FLT32X_MIN_10_EXP __FLT32X_MIN_10_EXP__
425#undef FLT32X_MAX_EXP
426#define FLT32X_MAX_EXP __FLT32X_MAX_EXP__
427#undef FLT32X_MAX_10_EXP
428#define FLT32X_MAX_10_EXP __FLT32X_MAX_10_EXP__
429#undef FLT32X_MAX
430#define FLT32X_MAX __FLT32X_MAX__
431#undef FLT32X_EPSILON
432#define FLT32X_EPSILON __FLT32X_EPSILON__
433#undef FLT32X_MIN
434#define FLT32X_MIN __FLT32X_MIN__
435#undef FLT32X_DECIMAL_DIG
436#define FLT32X_DECIMAL_DIG __FLT32X_DECIMAL_DIG__
437#undef FLT32X_TRUE_MIN
438#define FLT32X_TRUE_MIN __FLT32X_DENORM_MIN__
439#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
440#undef FLT32X_SNAN
441#define FLT32X_SNAN (__builtin_nansf32x (""))
442#endif /* C2X */
443#endif /* __FLT32X_MANT_DIG__. */
444
445#ifdef __FLT64X_MANT_DIG__
446#undef FLT64X_MANT_DIG
447#define FLT64X_MANT_DIG __FLT64X_MANT_DIG__
448#undef FLT64X_DIG
449#define FLT64X_DIG __FLT64X_DIG__
450#undef FLT64X_MIN_EXP
451#define FLT64X_MIN_EXP __FLT64X_MIN_EXP__
452#undef FLT64X_MIN_10_EXP
453#define FLT64X_MIN_10_EXP __FLT64X_MIN_10_EXP__
454#undef FLT64X_MAX_EXP
455#define FLT64X_MAX_EXP __FLT64X_MAX_EXP__
456#undef FLT64X_MAX_10_EXP
457#define FLT64X_MAX_10_EXP __FLT64X_MAX_10_EXP__
458#undef FLT64X_MAX
459#define FLT64X_MAX __FLT64X_MAX__
460#undef FLT64X_EPSILON
461#define FLT64X_EPSILON __FLT64X_EPSILON__
462#undef FLT64X_MIN
463#define FLT64X_MIN __FLT64X_MIN__
464#undef FLT64X_DECIMAL_DIG
465#define FLT64X_DECIMAL_DIG __FLT64X_DECIMAL_DIG__
466#undef FLT64X_TRUE_MIN
467#define FLT64X_TRUE_MIN __FLT64X_DENORM_MIN__
468#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
469#undef FLT64X_SNAN
470#define FLT64X_SNAN (__builtin_nansf64x (""))
471#endif /* C2X */
472#endif /* __FLT64X_MANT_DIG__. */
473
474#ifdef __FLT128X_MANT_DIG__
475#undef FLT128X_MANT_DIG
476#define FLT128X_MANT_DIG __FLT128X_MANT_DIG__
477#undef FLT128X_DIG
478#define FLT128X_DIG __FLT128X_DIG__
479#undef FLT128X_MIN_EXP
480#define FLT128X_MIN_EXP __FLT128X_MIN_EXP__
481#undef FLT128X_MIN_10_EXP
482#define FLT128X_MIN_10_EXP __FLT128X_MIN_10_EXP__
483#undef FLT128X_MAX_EXP
484#define FLT128X_MAX_EXP __FLT128X_MAX_EXP__
485#undef FLT128X_MAX_10_EXP
486#define FLT128X_MAX_10_EXP __FLT128X_MAX_10_EXP__
487#undef FLT128X_MAX
488#define FLT128X_MAX __FLT128X_MAX__
489#undef FLT128X_EPSILON
490#define FLT128X_EPSILON __FLT128X_EPSILON__
491#undef FLT128X_MIN
492#define FLT128X_MIN __FLT128X_MIN__
493#undef FLT128X_DECIMAL_DIG
494#define FLT128X_DECIMAL_DIG __FLT128X_DECIMAL_DIG__
495#undef FLT128X_TRUE_MIN
496#define FLT128X_TRUE_MIN __FLT128X_DENORM_MIN__
497#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
498#undef FLT128X_SNAN
499#define FLT128X_SNAN (__builtin_nansf128x (""))
500#endif /* C2X */
501#endif /* __FLT128X_MANT_DIG__. */
502
503#endif /* __STDC_WANT_IEC_60559_TYPES_EXT__. */
504
505#ifdef __DEC32_MANT_DIG__
506#if (defined __STDC_WANT_DEC_FP__ \
507 || defined __STDC_WANT_IEC_60559_DFP_EXT__ \
508 || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
509/* C2X; formerly Technical Report 24732, extension for decimal
510 floating-point arithmetic: Characteristic of decimal floating types
511 <float.h>, and TS 18661-2. */
512
513/* Number of base-FLT_RADIX digits in the significand, p. */
514#undef DEC32_MANT_DIG
515#undef DEC64_MANT_DIG
516#undef DEC128_MANT_DIG
517#define DEC32_MANT_DIG __DEC32_MANT_DIG__
518#define DEC64_MANT_DIG __DEC64_MANT_DIG__
519#define DEC128_MANT_DIG __DEC128_MANT_DIG__
520
521/* Minimum exponent. */
522#undef DEC32_MIN_EXP
523#undef DEC64_MIN_EXP
524#undef DEC128_MIN_EXP
525#define DEC32_MIN_EXP __DEC32_MIN_EXP__
526#define DEC64_MIN_EXP __DEC64_MIN_EXP__
527#define DEC128_MIN_EXP __DEC128_MIN_EXP__
528
529/* Maximum exponent. */
530#undef DEC32_MAX_EXP
531#undef DEC64_MAX_EXP
532#undef DEC128_MAX_EXP
533#define DEC32_MAX_EXP __DEC32_MAX_EXP__
534#define DEC64_MAX_EXP __DEC64_MAX_EXP__
535#define DEC128_MAX_EXP __DEC128_MAX_EXP__
536
537/* Maximum representable finite decimal floating-point number
538 (there are 6, 15, and 33 9s after the decimal points respectively). */
539#undef DEC32_MAX
540#undef DEC64_MAX
541#undef DEC128_MAX
542#define DEC32_MAX __DEC32_MAX__
543#define DEC64_MAX __DEC64_MAX__
544#define DEC128_MAX __DEC128_MAX__
545
546/* The difference between 1 and the least value greater than 1 that is
547 representable in the given floating point type. */
548#undef DEC32_EPSILON
549#undef DEC64_EPSILON
550#undef DEC128_EPSILON
551#define DEC32_EPSILON __DEC32_EPSILON__
552#define DEC64_EPSILON __DEC64_EPSILON__
553#define DEC128_EPSILON __DEC128_EPSILON__
554
555/* Minimum normalized positive floating-point number. */
556#undef DEC32_MIN
557#undef DEC64_MIN
558#undef DEC128_MIN
559#define DEC32_MIN __DEC32_MIN__
560#define DEC64_MIN __DEC64_MIN__
561#define DEC128_MIN __DEC128_MIN__
562
563/* The floating-point expression evaluation method.
564 -1 indeterminate
565 0 evaluate all operations and constants just to the range and
566 precision of the type
567 1 evaluate operations and constants of type _Decimal32
568 and _Decimal64 to the range and precision of the _Decimal64
569 type, evaluate _Decimal128 operations and constants to the
570 range and precision of the _Decimal128 type;
571 2 evaluate all operations and constants to the range and
572 precision of the _Decimal128 type. */
573
574#undef DEC_EVAL_METHOD
575#define DEC_EVAL_METHOD __DEC_EVAL_METHOD__
576
577#endif /* __STDC_WANT_DEC_FP__ || __STDC_WANT_IEC_60559_DFP_EXT__ || C2X. */
578
579#ifdef __STDC_WANT_DEC_FP__
580
581/* Minimum subnormal positive floating-point number. */
582#undef DEC32_SUBNORMAL_MIN
583#undef DEC64_SUBNORMAL_MIN
584#undef DEC128_SUBNORMAL_MIN
585#define DEC32_SUBNORMAL_MIN __DEC32_SUBNORMAL_MIN__
586#define DEC64_SUBNORMAL_MIN __DEC64_SUBNORMAL_MIN__
587#define DEC128_SUBNORMAL_MIN __DEC128_SUBNORMAL_MIN__
588
589#endif /* __STDC_WANT_DEC_FP__. */
590
591#if (defined __STDC_WANT_IEC_60559_DFP_EXT__ \
592 || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
593
594/* Minimum subnormal positive floating-point number. */
595#undef DEC32_TRUE_MIN
596#undef DEC64_TRUE_MIN
597#undef DEC128_TRUE_MIN
598#define DEC32_TRUE_MIN __DEC32_SUBNORMAL_MIN__
599#define DEC64_TRUE_MIN __DEC64_SUBNORMAL_MIN__
600#define DEC128_TRUE_MIN __DEC128_SUBNORMAL_MIN__
601
602#endif /* __STDC_WANT_IEC_60559_DFP_EXT__ || C2X. */
603
604#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
605
606/* Infinity in type _Decimal32. */
607#undef DEC_INFINITY
608#define DEC_INFINITY (__builtin_infd32 ())
609
610/* Quiet NaN in type _Decimal32. */
611#undef DEC_NAN
612#define DEC_NAN (__builtin_nand32 (""))
613
614/* Signaling NaN in each decimal floating-point type. */
615#undef DEC32_SNAN
616#define DEC32_SNAN (__builtin_nansd32 (""))
617#undef DEC64_SNAN
618#define DEC64_SNAN (__builtin_nansd64 (""))
619#undef DEC128_SNAN
620#define DEC128_SNAN (__builtin_nansd128 (""))
621
622#endif /* C2X */
623
624#endif /* __DEC32_MANT_DIG__ */
625
626#endif /* _FLOAT_H___ */
627#include_next <float.h>
Note: See TracBrowser for help on using the repository browser.