[mpmath] r1237 committed - Fixed previous patch to force an mpz() to a Python integer before perf...

4 views
Skip to first unread message

mpm...@googlecode.com

unread,
Jun 8, 2011, 12:01:19 AM6/8/11
to mpmath-...@googlegroups.com
Revision: 1237
Author: casevh
Date: Tue Jun 7 21:00:27 2011
Log: Fixed previous patch to force an mpz() to a Python integer before
performing a float division.
http://code.google.com/p/mpmath/source/detail?r=1237

Modified:
/trunk/mpmath/libmp/libelefun.py

=======================================
--- /trunk/mpmath/libmp/libelefun.py Sun Jun 5 19:55:02 2011
+++ /trunk/mpmath/libmp/libelefun.py Tue Jun 7 21:00:27 2011
@@ -783,9 +783,9 @@

def atan_newton(x, prec):
if prec >= 100:
- r = math.atan(long((x>>(prec-53)))/2.0**53)
+ r = math.atan(int((x>>(prec-53)))/2.0**53)
else:
- r = math.atan(long(x)/2.0**prec)
+ r = math.atan(int(x)/2.0**prec)
prevp = 50
r = MPZ(int(r * 2.0**53) >> (53-prevp))
extra_p = 50

Reply all
Reply to author
Forward
0 new messages