⛏️ index : buildtools.git

author Adrien Destugues <pulkomandy@gmail.com> 2014-10-15 8:29:00.0 +02:00:00
committer Adrien Destugues <pulkomandy@gmail.com> 2014-10-15 8:29:00.0 +02:00:00
commit
e7b6630b6be7be30b4cf393ff7c00a661281764e [patch]
tree
f62558cfa52aabf219554579acf69e8e115029b1
parent
4319c0ca135067023f5c209280715355b2391842
download
e7b6630b6be7be30b4cf393ff7c00a661281764e.tar.gz

gcc2: rewrite LDBL_MIN/MAX/EPSILON without hex-floats.

* Values are taken from http://www.opengroup.org/csq/repository/appendix/oracle/iscl_appendix.html
* Confirmed to give the same results as the constants used in gcc4
* Should work in C++, where gcc2 doesn't support hex-floats

Diff

 legacy/gcc/gcc/config/float-i386.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/legacy/gcc/gcc/config/float-i386.h b/legacy/gcc/gcc/config/float-i386.h
index 120f544..7f3c298 100644
--- a/legacy/gcc/gcc/config/float-i386.h
+++ b/legacy/gcc/gcc/config/float-i386.h
@@ -74,7 +74,7 @@
#define LDBL_DIG 18
   /* Difference between 1.0 and the minimum long double greater than 1.0 */
#undef LDBL_EPSILON
#define LDBL_EPSILON 0x1p-63l
#define LDBL_EPSILON 1.0842021724855044340075E-19L
   /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
#undef LDBL_MIN_EXP
#define LDBL_MIN_EXP (-16381)
@@ -89,7 +89,7 @@
#define LDBL_MAX_EXP 16384
   /* Maximum long double */
#undef LDBL_MAX
#define LDBL_MAX 0xfffffffffffffffp16320l
#define LDBL_MAX 1.1897314953572317650213E+4932L
   /* Maximum int x such that 10**x is a representable long double */
#undef LDBL_MAX_10_EXP
#define LDBL_MAX_10_EXP 4932