[Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.105,2.106

Tim Peters tim_one@users.sourceforge.net
2001年11月01日 15:59:59 -0800


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv23901/python/Objects
Modified Files:
	floatobject.c 
Log Message:
float_divmod(): the code wasn't sick enough to stop the MS optimizer
from optimizing away mod's sign adjustment when mod == 0; so it got
the intended result only in the debug build.
Index: floatobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v
retrieving revision 2.105
retrieving revision 2.106
diff -C2 -d -r2.105 -r2.106
*** floatobject.c	2001年11月01日 23:12:27	2.105
--- floatobject.c	2001年11月01日 23:59:56	2.106
***************
*** 477,481 ****
 		 it has the same sign as the denominator; we'd like to do
 		 "mod = wx * 0.0", but that may get optimized away */
! 		mod = 0.0;
 		if (wx < 0.0)
 			mod = -mod;
--- 477,481 ----
 		 it has the same sign as the denominator; we'd like to do
 		 "mod = wx * 0.0", but that may get optimized away */
! 		mod *= mod; /* hide "mod = +0" from optimizer */
 		if (wx < 0.0)
 			mod = -mod;

AltStyle によって変換されたページ (->オリジナル) /