]> granicus.if.org Git - python/commitdiff
Issue #5781: Only use legacy string<->double conversions when
authorMark Dickinson <dickinsm@gmail.com>
Sat, 18 Apr 2009 10:16:35 +0000 (10:16 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sat, 18 Apr 2009 10:16:35 +0000 (10:16 +0000)
we can't figure out how to get and set the x87 control word.

Include/pyport.h

index ed435697d336b4e99685e7f13f5e63034d9c88c7..9b8b1e7f82dcf14682ef78116983e19f1157aea3 100644 (file)
@@ -506,8 +506,10 @@ extern "C" {
 #define PY_NO_SHORT_FLOAT_REPR
 #endif
 
-/* double rounding is symptomatic of use of extended precision on x86 */
-#ifdef X87_DOUBLE_ROUNDING
+/* double rounding is symptomatic of use of extended precision on x86.  If
+   we're seeing double rounding, and we don't have any mechanism available for
+   changing the FPU rounding precision, then don't use Python/dtoa.c. */
+#if defined(X87_DOUBLE_ROUNDING) && !defined(HAVE_GCC_ASM_FOR_X87)
 #define PY_NO_SHORT_FLOAT_REPR
 #endif