[mpmath] r1240 committed - fix slowness of repr(constant) at high precision

2 views
Skip to first unread message

mpm...@googlecode.com

unread,
Sep 16, 2011, 1:09:50 PM9/16/11
to mpmath-...@googlegroups.com
Revision: 1240
Author: fredrik.johansson
Date: Fri Sep 16 10:09:09 2011
Log: fix slowness of repr(constant) at high precision
http://code.google.com/p/mpmath/source/detail?r=1240

Modified:
/trunk/mpmath/ctx_mp_python.py

=======================================
--- /trunk/mpmath/ctx_mp_python.py Thu Feb 3 05:08:12 2011
+++ /trunk/mpmath/ctx_mp_python.py Fri Sep 16 10:09:09 2011
@@ -351,7 +351,7 @@
return self.func(prec, rounding)

def __repr__(self):
- return "<%s: %s~>" % (self.name, self.context.nstr(self))
+ return "<%s: %s~>" % (self.name, self.context.nstr(self(dps=15)))


class _mpc(mpnumeric):

Reply all
Reply to author
Forward
0 new messages