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 /* Difference between 1.0 and the minimum float greater than 1.0 */
33 #define FLT_EPSILON 1.19209290e-07F
34 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
35 #define FLT_MIN_EXP (-125)
36 /* Minimum normalised float */
37 #define FLT_MIN 1.17549435e-38F
38 /* Minimum int x such that 10**x is a normalised float */
39 #define FLT_MIN_10_EXP (-37)
40 /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
41 #define FLT_MAX_EXP 128
43 #define FLT_MAX 3.40282347e+38F
44 /* Maximum int x such that 10**x is a representable float */
45 #define FLT_MAX_10_EXP 38
47 /* Number of base-FLT_RADIX digits in the significand of a double */
48 #define DBL_MANT_DIG 53
49 /* Number of decimal digits of precision in a double */
51 /* Difference between 1.0 and the minimum double greater than 1.0 */
52 #define DBL_EPSILON 2.2204460492503131e-16
53 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
54 #define DBL_MIN_EXP (-1021)
55 /* Minimum normalised double */
56 #define DBL_MIN 2.2250738585072014e-308
57 /* Minimum int x such that 10**x is a normalised double */
58 #define DBL_MIN_10_EXP (-307)
59 /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
60 #define DBL_MAX_EXP 1024
62 #define DBL_MAX 1.7976931348623157e+308
63 /* Maximum int x such that 10**x is a representable double */
64 #define DBL_MAX_10_EXP 308
66 /* Number of base-FLT_RADIX digits in the significand of a long double */
67 #define LDBL_MANT_DIG 113
68 /* Number of decimal digits of precision in a long double */
70 /* Difference between 1.0 and the minimum long double greater than 1.0 */
71 #define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
72 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
73 #define LDBL_MIN_EXP (-16381)
74 /* Minimum normalised long double */
75 #define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
76 /* Minimum int x such that 10**x is a normalised long double */
77 #define LDBL_MIN_10_EXP (-4931)
78 /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
79 #define LDBL_MAX_EXP 16384
80 /* Maximum long double */
81 #define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
82 /* Maximum int x such that 10**x is a representable long double */
83 #define LDBL_MAX_10_EXP 4932