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