This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
i370 float.h values?
- From: Richard Henderson <rth at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Cc: uweigand at de dot ibm dot com
- Date: Mon, 2 Sep 2002 15:08:23 -0700
- Subject: i370 float.h values?
I've not located a proper description of the IBM 370 floating-point
format, and based on the one thing I found:
Float name Radix Sign Exponent Fraction Bias
---------- ----- ---- -------- -------- -----
IBM 370:
* REAL*4 16 1 7 24 64 0.f * 16**(e-64)
* REAL*8 16 1 7 56 64
I came up with the fundamental constants
#define __FLT_RADIX__ 16
#define __FLT_MANT_DIG__ 6
#define __FLT_MIN_EXP__ (-63)
#define __FLT_MAX_EXP__ 63
#define __DBL_MANT_DIG__ 14
#define __DBL_MIN_EXP__ (-63)
#define __DBL_MAX_EXP__ 63
from which I derive the rest of the values:
#define __DECIMAL_DIG__ 18
#define __FLT_DIG__ 6
#define __FLT_EPSILON__ 0x1p-20F
#define __FLT_MAX_10_EXP__ 75
#define __FLT_MAX__ 0x1.fffffep251F
#define __FLT_MIN_10_EXP__ (-77)
#define __FLT_MIN__ 0x1p-67F
#define __DBL_DIG__ 15
#define __DBL_EPSILON__ 0x1p-52
#define __DBL_MAX_10_EXP__ 75
#define __DBL_MAX__ 0x1.fffffffffffffep251
#define __DBL_MIN_10_EXP__ (-77)
#define __DBL_MIN__ 0x1p-67
Can someone check these values against a proper ibm 370 float.h?
If they're wrong, I'd also appreciate a pointer to the format so
that I can understand how I messed up.
r~