blob: 28fb882bd24a488ad6e68b106e7910d135a84099 [file] [log] [blame]
Anders Carlsson629c5b42008-12-26 17:10:18 +00001/*===---- float.h - Characteristics of floating point types ----------------===
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 * THE SOFTWARE.
20 *
21 *===-----------------------------------------------------------------------===
22 */
23
24#ifndef __FLOAT_H
25#define __FLOAT_H
26
27/* Characteristics of floating point types, C99 5.2.4.2.2 */
28
29#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
30#define FLT_ROUNDS (__builtin_flt_rounds())
31#define FLT_RADIX __FLT_RADIX__
32
33#define FLT_MANT_DIG __FLT_MANT_DIG__
34#define DBL_MANT_DIG __DBL_MANT_DIG__
35#define LDBL_MANT_DIG __LDBL_MANT_DIG__
36
37#define DECIMAL_DIG __DECIMAL_DIG__
38
Anders Carlsson6b06b7a2008-12-26 22:49:10 +000039#define FLT_DIG __FLT_DIG__
40#define DBL_DIG __DBL_DIG__
41#define LDBL_DIG __LDBL_DIG__
42
Anders Carlsson629c5b42008-12-26 17:10:18 +000043#define FLT_MIN_EXP __FLT_MIN_EXP__
44#define DBL_MIN_EXP __DBL_MIN_EXP__
45#define LDBL_MIN_EXP __LDBL_MIN_EXP__
46
47#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
48#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
49#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
50
Anders Carlsson6b06b7a2008-12-26 22:49:10 +000051#define FLT_MAX_EXP __FLT_MAX_EXP__
52#define DBL_MAX_EXP __DBL_MAX_EXP__
53#define LDBL_MAX_EXP __LDBL_MAX_EXP__
54
55#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
56#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
57#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
58
Anders Carlsson629c5b42008-12-26 17:10:18 +000059#define FLT_MAX __FLT_MAX__
60#define DBL_MAX __DBL_MAX__
61#define LDBL_MAX __LDBL_MAX__
62
63#define FLT_EPSILON __FLT_EPSILON__
64#define DBL_EPSILON __DBL_EPSILON__
65#define LDBL_EPSILON __LDBL_EPSILON__
66
67#define FLT_MIN __FLT_MIN__
68#define DBL_MIN __DBL_MIN__
69#define LDBL_MIN __LDBL_MIN__
70
71#endif /* __FLOAT_H */