2009-04-13 Ozkan Sezer <sezeroz@gmail.com>
* gdtoa/dtoa.c, gdtoa/gdtoa.c, gdtoa/gdtoaimp.h, gdtoa/misc.c,
gdtoa/smisc.c, gdtoa/strtodg.c, gdtoa/ulp.c: Revmoved support for IBM,
CRAY and VAX modes and replaced typecast assignments by union usage:
The IBM, CRAY and VAX macros still live in the gdtoa.h and gdtoaimp.h,
but all the actual code supporting them are deleted for more a clear
code.
git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@765 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-crt/gdtoa/ulp.c b/mingw-w64-crt/gdtoa/ulp.c
index 98ebdef..373c9cd 100644
--- a/mingw-w64-crt/gdtoa/ulp.c
+++ b/mingw-w64-crt/gdtoa/ulp.c
@@ -34,21 +34,14 @@
double ulp (double x)
{
Long L;
-#ifdef __HAVE_GCC44
union _dbl_union a;
+
a.d = x;
L = (word0(a) & Exp_mask) - (P-1)*Exp_msk1;
-#else
- double a = 0.0;
- L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
-#endif
#ifndef Sudden_Underflow
if (L > 0) {
#endif
-#ifdef IBM
- L |= Exp_msk1 >> 4;
-#endif
word0(a) = L;
word1(a) = 0;
#ifndef Sudden_Underflow
@@ -66,9 +59,5 @@
}
}
#endif
-#ifdef __HAVE_GCC44
return dval(a);
-#else
- return a;
-#endif
}