Use a different argument value for the fp.erfc example

The PyPy uses a different implementations for erf/erfc, while the
CPython per default uses coming with the libm (which answer is
better for 2.5).  Let's choose an argument value where both
versions do agree.
This commit is contained in:
Sergey B Kirpichev
2023-05-10 10:03:37 +03:00
parent f240905dde
commit c11c4c9881
+5 -5
View File
@@ -255,14 +255,14 @@ Although mpmath is generally designed for arbitrary-precision arithmetic, many o
To take advantage of this feature, simply use the ``fp`` prefix, i.e. write ``fp.func`` instead of ``func`` or ``mp.func``::
>>> u = fp.erfc(2.5)
>>> u = fp.erfc(0.5)
>>> print(u)
0.00040695201744495...
0.4795001221869535
>>> type(u)
<class 'float'>
>>> mp.dps = 15
>>> print(mp.erfc(2.5))
0.000406952017444959
>>> mp.dps = 16
>>> print(mp.erfc(0.5))
0.4795001221869535
>>> fp.matrix([[1,2],[3,4]]) ** 2
matrix(
[['7.0', '10.0'],