5 /* 7.7 Characteristics of floating types <float.h>
7 This file is part of the Public Domain C Library (PDCLib).
8 Permission is granted to use, modify, and / or redistribute at will.
11 #ifndef _PDCLIB_FLOAT_H
12 #define _PDCLIB_FLOAT_H _PDCLIB_FLOAT_H
14 #ifndef _PDCLIB_CONFIG_H
15 #define _PDCLIB_CONFIG_H _PDCLIB_CONFIG_H
16 #include <_PDCLIB_config.h>
19 #define FLT_ROUNDS _PDCLIB_FLT_ROUNDS
20 #define FLT_EVAL_METHOD _PDCLIB_FLT_EVAL_METHOD
21 #define DECIMAL_DIG _PDCLIB_DECIMAL_DIG
23 /* Produced by enquire version 5.1a, CWI, Amsterdam
24 http://www.cwi.nl/~steven/enquire.html */
26 /* Radix of exponent representation */
28 /* Number of base-FLT_RADIX digits in the significand of a float */
29 #define FLT_MANT_DIG 24
30 /* Number of decimal digits of precision in a float */
32 /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
34 /* Difference between 1.0 and the minimum float greater than 1.0 */
35 #define FLT_EPSILON 1.19209290e-07F
36 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
37 #define FLT_MIN_EXP (-125)
38 /* Minimum normalised float */
39 #define FLT_MIN 1.17549435e-38F
40 /* Minimum int x such that 10**x is a normalised float */
41 #define FLT_MIN_10_EXP (-37)
42 /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
43 #define FLT_MAX_EXP 128
45 #define FLT_MAX 3.40282347e+38F
46 /* Maximum int x such that 10**x is a representable float */
47 #define FLT_MAX_10_EXP 38
49 /* Number of base-FLT_RADIX digits in the significand of a double */
50 #define DBL_MANT_DIG 53
51 /* Number of decimal digits of precision in a double */
53 /* Difference between 1.0 and the minimum double greater than 1.0 */
54 #define DBL_EPSILON 2.2204460492503131e-16
55 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
56 #define DBL_MIN_EXP (-1021)
57 /* Minimum normalised double */
58 #define DBL_MIN 2.2250738585072014e-308
59 /* Minimum int x such that 10**x is a normalised double */
60 #define DBL_MIN_10_EXP (-307)
61 /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
62 #define DBL_MAX_EXP 1024
64 #define DBL_MAX 1.7976931348623157e+308
65 /* Maximum int x such that 10**x is a representable double */
66 #define DBL_MAX_10_EXP 308
68 /* Number of base-FLT_RADIX digits in the significand of a long double */
69 #define LDBL_MANT_DIG 113
70 /* Number of decimal digits of precision in a long double */
72 /* Difference between 1.0 and the minimum long double greater than 1.0 */
73 #define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
74 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
75 #define LDBL_MIN_EXP (-16381)
76 /* Minimum normalised long double */
77 #define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
78 /* Minimum int x such that 10**x is a normalised long double */
79 #define LDBL_MIN_10_EXP (-4931)
80 /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
81 #define LDBL_MAX_EXP 16384
82 /* Maximum long double */
83 #define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
84 /* Maximum int x such that 10**x is a representable long double */
85 #define LDBL_MAX_10_EXP 4932