B
bq
Hello,
Two questions related to floating point support:
What C compilers for the wintel (MS Windows + x86) platform are C99
compliant as far as <math.h> and <tgmath.h> are concerned?
What wintel compilers support a 16-byte "long double" (with 33 decimal
digits of accuracy) including proper printf() support. I found some
compilers that did support "long double", but theirs was an 8-byte or
10-byte or 12-byte type with accuracy the same or nearly the same as
the plain 8-byte "double".
Thanks
fq
Note: My numbers were obtained by "sizeof" and "float.h" macros
DBL_DIGITS and LDBL_DIGITS.
Here is output from OpenWatcom 1.2:
FLT_EPSILON = 1.19209e-007
DBL_EPSILON = 2.22045e-016
LDBL_EPSILON = 2.22045e-016
FLT_DIG = 6
DBL_DIG = 15
LDBL_DIG = 15
FLT_MANT_DIG = 24
DBL_MANT_DIG = 53
LDBL_MANT_DIG = 53
and from Borland 5.5.1:
FLT_EPSILON = 1.19209e-07
DBL_EPSILON = 2.22045e-16
LDBL_EPSILON = 1.0842e-19
FLT_DIG = 6
DBL_DIG = 15
LDBL_DIG = 18
FLT_MANT_DIG = 24
DBL_MANT_DIG = 53
LDBL_MANT_DIG = 64
and, for comparison, from the SUN compiler (on Solaris):
FLT_EPSILON = 1.19209e-07
DBL_EPSILON = 2.22045e-16
LDBL_EPSILON = 1.92593e-34
FLT_DIG = 6
DBL_DIG = 15
LDBL_DIG = 33
FLT_MANT_DIG = 24
DBL_MANT_DIG = 53
LDBL_MANT_DIG = 113
Two questions related to floating point support:
What C compilers for the wintel (MS Windows + x86) platform are C99
compliant as far as <math.h> and <tgmath.h> are concerned?
What wintel compilers support a 16-byte "long double" (with 33 decimal
digits of accuracy) including proper printf() support. I found some
compilers that did support "long double", but theirs was an 8-byte or
10-byte or 12-byte type with accuracy the same or nearly the same as
the plain 8-byte "double".
Thanks
fq
Note: My numbers were obtained by "sizeof" and "float.h" macros
DBL_DIGITS and LDBL_DIGITS.
Here is output from OpenWatcom 1.2:
FLT_EPSILON = 1.19209e-007
DBL_EPSILON = 2.22045e-016
LDBL_EPSILON = 2.22045e-016
FLT_DIG = 6
DBL_DIG = 15
LDBL_DIG = 15
FLT_MANT_DIG = 24
DBL_MANT_DIG = 53
LDBL_MANT_DIG = 53
and from Borland 5.5.1:
FLT_EPSILON = 1.19209e-07
DBL_EPSILON = 2.22045e-16
LDBL_EPSILON = 1.0842e-19
FLT_DIG = 6
DBL_DIG = 15
LDBL_DIG = 18
FLT_MANT_DIG = 24
DBL_MANT_DIG = 53
LDBL_MANT_DIG = 64
and, for comparison, from the SUN compiler (on Solaris):
FLT_EPSILON = 1.19209e-07
DBL_EPSILON = 2.22045e-16
LDBL_EPSILON = 1.92593e-34
FLT_DIG = 6
DBL_DIG = 15
LDBL_DIG = 33
FLT_MANT_DIG = 24
DBL_MANT_DIG = 53
LDBL_MANT_DIG = 113