[Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.62,2.63
Tim Peters
tim_one@users.sourceforge.net
Tue, 04 Sep 2001 21:33:13 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv28828/python/Modules
Modified Files:
mathmodule.c
Log Message:
loghelper(): Try to nudge the compiler into doing mults in an order that
minimizes roundoff error.
Index: mathmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mathmodule.c,v
retrieving revision 2.62
retrieving revision 2.63
diff -C2 -d -r2.62 -r2.63
*** mathmodule.c 2001/09/05 00:53:45 2.62
--- mathmodule.c 2001/09/05 04:33:11 2.63
***************
*** 264,268 ****
CAUTION: e*SHIFT may overflow using int arithmetic,
so force use of double. */
! x = func(x) + func(2.0) * (double)e * (double)SHIFT;
return PyFloat_FromDouble(x);
}
--- 264,268 ----
CAUTION: e*SHIFT may overflow using int arithmetic,
so force use of double. */
! x = func(x) + (e * (double)SHIFT) * func(2.0);
return PyFloat_FromDouble(x);
}