1 /* Characteristics of floating types <float.h> 2 3 This file is part of the Public Domain C Library (PDCLib). 4 Permission is granted to use, modify, and / or redistribute at will. 5 */ 6 7 #ifndef _PDCLIB_FLOAT_H 8 #define _PDCLIB_FLOAT_H _PDCLIB_FLOAT_H 9 10 #include "pdclib/_PDCLIB_config.h" 11 12 #define FLT_ROUNDS _PDCLIB_FLT_ROUNDS 13 #define FLT_EVAL_METHOD _PDCLIB_FLT_EVAL_METHOD 14 #define DECIMAL_DIG _PDCLIB_DECIMAL_DIG 15 16 /* Radix of exponent representation */ 17 #define FLT_RADIX __FLT_RADIX__ 18 /* Number of base-FLT_RADIX digits in the significand of a float */ 19 #define FLT_MANT_DIG __FLT_MANT_DIG__ 20 /* Number of decimal digits of precision in a float */ 21 #define FLT_DIG __FLT_DIG__ 22 /* Difference between 1.0 and the minimum float greater than 1.0 */ 23 #define FLT_EPSILON __FLT_EPSILON__ 24 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ 25 #define FLT_MIN_EXP __FLT_MIN_EXP__ 26 /* Minimum normalised float */ 27 #define FLT_MIN __FLT_MIN__ 28 /* Minimum int x such that 10**x is a normalised float */ 29 #define FLT_MIN_10_EXP __FLT_MIN_10_EXP__ 30 /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ 31 #define FLT_MAX_EXP __FLT_MAX_EXP__ 32 /* Maximum float */ 33 #define FLT_MAX __FLT_MAX__ 34 /* Maximum int x such that 10**x is a representable float */ 35 #define FLT_MAX_10_EXP __FLT_MAX_10_EXP__ 36 37 /* Number of base-FLT_RADIX digits in the significand of a double */ 38 #define DBL_MANT_DIG __DBL_MANT_DIG__ 39 /* Number of decimal digits of precision in a double */ 40 #define DBL_DIG __DBL_DIG__ 41 /* Difference between 1.0 and the minimum double greater than 1.0 */ 42 #define DBL_EPSILON __DBL_EPSILON__ 43 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ 44 #define DBL_MIN_EXP __DBL_MIN_EXP__ 45 /* Minimum normalised double */ 46 #define DBL_MIN __DBL_MIN__ 47 /* Minimum int x such that 10**x is a normalised double */ 48 #define DBL_MIN_10_EXP __DBL_MIN_10_EXP__ 49 /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ 50 #define DBL_MAX_EXP __DBL_MAX_EXP__ 51 /* Maximum double */ 52 #define DBL_MAX __DBL_MAX__ 53 /* Maximum int x such that 10**x is a representable double */ 54 #define DBL_MAX_10_EXP __DBL_MAX_10_EXP__ 55 56 /* Number of base-FLT_RADIX digits in the significand of a long double */ 57 #define LDBL_MANT_DIG __LDBL_MANT_DIG__ 58 /* Number of decimal digits of precision in a long double */ 59 #define LDBL_DIG __LDBL_DIG__ 60 /* Difference between 1.0 and the minimum long double greater than 1.0 */ 61 #define LDBL_EPSILON __LDBL_EPSILON__ 62 /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ 63 #define LDBL_MIN_EXP __LDBL_MIN_EXP__ 64 /* Minimum normalised long double */ 65 #define LDBL_MIN __LDBL_MIN__ 66 /* Minimum int x such that 10**x is a normalised long double */ 67 #define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__ 68 /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ 69 #define LDBL_MAX_EXP __LDBL_MAX_EXP__ 70 /* Maximum long double */ 71 #define LDBL_MAX __LDBL_MAX__ 72 /* Maximum int x such that 10**x is a representable long double */ 73 #define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__ 74 75 /* Extension hook for downstream projects that want to have non-standard 76 extensions to standard headers. 77 */ 78 #ifdef _PDCLIB_EXTEND_FLOAT_H 79 #include _PDCLIB_EXTEND_FLOAT_H 80 #endif 81 82 #endif 83