# HG changeset patch
# User Nick Alexander <ncalexander@gmail.com>
# Date 1245451826 25200
# Node ID e662640eaa16d2b90b76bc61419b1c667d928b84
# Parent  cdd8fb8860c429b34585a69a4d47f1475e7c1ac3
[mq]: trac_6196-ncalexan.patch

diff -r cdd8fb8860c4 -r e662640eaa16 sage/libs/mpmath/utils.pyx
--- a/sage/libs/mpmath/utils.pyx	Fri Jun 19 15:17:45 2009 -0700
+++ b/sage/libs/mpmath/utils.pyx	Fri Jun 19 15:50:26 2009 -0700
@@ -170,6 +170,38 @@
         NaN
         sage: a.mpmath_to_sage(a.mpf('0'), 53)  
         0.000000000000000
+
+    A real example::
+        
+        sage: RealField(100)(pi)
+        3.1415926535897932384626433833
+        sage: t = RealField(100)(pi)._mpmath_(); t
+        mpf('3.1415926535897932')
+        sage: a.mpmath_to_sage(t, 100)
+        3.1415926535897932384626433833
+
+    We can ask for more precision, but the result is undefined::
+
+        sage: a.mpmath_to_sage(t, 140) # random
+        3.1415926535897932384626433832793333156440
+        sage: ComplexField(140)(pi)
+        3.1415926535897932384626433832795028841972
+
+    A complex example::
+        
+        sage: ComplexField(100)([0, pi])
+        3.1415926535897932384626433833*I
+        sage: t = ComplexField(100)([0, pi])._mpmath_(); t
+        mpc(real='0.0', imag='3.1415926535897932')
+        sage: sage.libs.mpmath.all.mpmath_to_sage(t, 100)
+        3.1415926535897932384626433833*I
+
+    Again, we can ask for more precision, but the result is undefined::
+
+        sage: sage.libs.mpmath.all.mpmath_to_sage(t, 140) # random
+        3.1415926535897932384626433832793333156440*I
+        sage: ComplexField(140)([0, pi])
+        3.1415926535897932384626433832795028841972*I
     """
     cdef RealNumber y
     cdef ComplexNumber z
diff -r cdd8fb8860c4 -r e662640eaa16 sage/rings/complex_number.pyx
--- a/sage/rings/complex_number.pyx	Fri Jun 19 15:17:45 2009 -0700
+++ b/sage/rings/complex_number.pyx	Fri Jun 19 15:50:26 2009 -0700
@@ -473,7 +473,7 @@
 
     def _mpmath_(self, prec=None, rounding=None):
         """
-        Returns an mpmath version of this CompleNumber.
+        Returns an mpmath version of this ComplexNumber.
 
         .. note::
 
