Fix null pointer constants
[tinycc.git] / include / float.h
blob24b7410bb725d4e3111672cb3468ea0309f430fc
1 #ifndef _FLOAT_H_
2 #define _FLOAT_H_
4 #define FLT_RADIX 2
6 /* IEEE float */
7 #define FLT_MANT_DIG 24
8 #define FLT_DIG 6
9 #define FLT_ROUNDS 1
10 #define FLT_EPSILON 1.19209290e-07F
11 #define FLT_MIN_EXP (-125)
12 #define FLT_MIN 1.17549435e-38F
13 #define FLT_MIN_10_EXP (-37)
14 #define FLT_MAX_EXP 128
15 #define FLT_MAX 3.40282347e+38F
16 #define FLT_MAX_10_EXP 38
18 /* IEEE double */
19 #define DBL_MANT_DIG 53
20 #define DBL_DIG 15
21 #define DBL_EPSILON 2.2204460492503131e-16
22 #define DBL_MIN_EXP (-1021)
23 #define DBL_MIN 2.2250738585072014e-308
24 #define DBL_MIN_10_EXP (-307)
25 #define DBL_MAX_EXP 1024
26 #define DBL_MAX 1.7976931348623157e+308
27 #define DBL_MAX_10_EXP 308
29 /* horrible intel long double */
30 #if defined __i386__ || defined __x86_64__
32 #define LDBL_MANT_DIG 64
33 #define LDBL_DIG 18
34 #define LDBL_EPSILON 1.08420217248550443401e-19L
35 #define LDBL_MIN_EXP (-16381)
36 #define LDBL_MIN 3.36210314311209350626e-4932L
37 #define LDBL_MIN_10_EXP (-4931)
38 #define LDBL_MAX_EXP 16384
39 #define LDBL_MAX 1.18973149535723176502e+4932L
40 #define LDBL_MAX_10_EXP 4932
41 #define DECIMAL_DIG 21
43 #elif defined __aarch64__ || defined __riscv
45 * Use values from:
46 * gcc -dM -E -xc /dev/null | grep LDBL | sed -e "s/__//g"
48 #define LDBL_MANT_DIG 113
49 #define LDBL_DIG 33
50 #define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
51 #define LDBL_MIN_EXP (-16381)
52 #define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
53 #define LDBL_MIN_10_EXP (-4931)
54 #define LDBL_MAX_EXP 16384
55 #define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
56 #define LDBL_MAX_EXP 16384
57 #define DECIMAL_DIG 36
59 #else
61 /* same as IEEE double */
62 #define LDBL_MANT_DIG 53
63 #define LDBL_DIG 15
64 #define LDBL_EPSILON 2.2204460492503131e-16L
65 #define LDBL_MIN_EXP (-1021)
66 #define LDBL_MIN 2.2250738585072014e-308L
67 #define LDBL_MIN_10_EXP (-307)
68 #define LDBL_MAX_EXP 1024
69 #define LDBL_MAX 1.7976931348623157e+308L
70 #define LDBL_MAX_10_EXP 308
71 #define DECIMAL_DIG 17
73 #endif
75 #endif /* _FLOAT_H_ */