/***********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2006, International Business Machines Corporation
+ * Copyright (c) 1997-2007, International Business Machines Corporation
* and others. All Rights Reserved.
***********************************************************************/
#endif
}
-#if defined XP_MAC || defined __alpha__ || defined U_OSF
-// These machines don't support denormalized doubles,
-// so the low-end range doesn't match Windows
+#if (defined(_MSC_VER) && _MSC_VER < 1400) || defined(__alpha__) || defined(U_OSF)
+ // These machines and compilers don't fully support denormalized doubles,
test(fmt, randomDouble(1e-292));
+ test(fmt, randomDouble(1e-100));
#elif defined(OS390) || defined(OS400)
+ // i5/OS (OS400) throws exceptions on denormalized numbers
# if IEEE_754
- test(fmt, randomDouble(1e-78)); /*OS390 and OS400*/
+ test(fmt, randomDouble(1e-78));
+ test(fmt, randomDouble(1e-78));
+ // #else we're using something like the old z/OS floating point.
# endif
#else
- test(fmt, randomDouble(1e-323));
-#endif /* OS390 and OS400*/
-#if !defined(OS390) && !defined(OS400)
+ // This is a normal machine that can support IEEE754 denormalized doubles without throwing an error.
+ test(fmt, randomDouble(DBL_MIN)); /* Usually 2.2250738585072014e-308 */
test(fmt, randomDouble(1e-100));
-#elif IEEE_754
- test(fmt, randomDouble(1e-78)); /*OS390 and OS400*/
-#endif /* OS390 and OS400*/
+#endif
}
}
if (show) {
errln(/*value.getString(temp) +*/ typeOf(value, temp) + " F> " +
- escape(s) + " P> " +
- /*n.getString(temp) +*/ typeOf(n, temp) + " F> " +
+ escape(s) + " P> " + (n.getType() == Formattable::kDouble ? n.getDouble() : (double)n.getLong())
+ /*n.getString(temp) */ + typeOf(n, temp) + " F> " +
escape(s2));
}
}