mpmath
/
CHANGES
1046 строк · 44.2 Кб
1--1.3.0--
2Released March 7, 2023
3
4Security issues:
5
6* Fixed ReDOS vulnerability in mpmathify() (CVE-2021-29063) (Vinzent Steinberg)
7
8Features:
9
10* Added quadsubdiv() for numerical integration with adaptive path splitting
11(Fredrik Johansson)
12* Added the Cohen algorithm for inverse Laplace transforms
13(Guillermo Navas-Palencia)
14* Some speedup of matrix multiplication (Fredrik Johansson)
15* Optimizations to Carlson elliptic integrals (Paul Masson)
16* Added signal functions (squarew(), trianglew(), sawtoothw(), unit_triangle()
17sigmoidw()) (Nike Dattani, Deyan Mihaylov, Tina Yu)
18
19Bug fixes:
20
21* Correct mpf initialization from tuple for finf and fninf (Sergey B Kirpichev)
22* Support QR decomposition for matrices of width 0 and 1 (Clemens Hofreither)
23* Fixed some cases where elliprj() gave inaccurate results (Fredrik Johansson)
24* Fixed cases where digamma() hangs for complex input (Fredrik Johansson)
25* Fixed cases of polylog() with integer-valued parameter with complex type
26(Fredrik Johansson)
27* Fixed fp.nsum() with Euler-Maclaurin algorithm (Fredrik Johansson)
28
29Maintenance:
30
31* Dropped support for Python 3.4 (Sergey B Kirpichev)
32* Documentation cleanup (Sergey B Kirpichev)
33* Removed obsolete files (Sergey B Kirpichev)
34* Added options to runtests.py to skip tests and exit on failure
35(Jonathan Warner)
36
37
38--1.2.0--
39Released February 1, 2021
40
41Features and optimizations:
42
43* Support @ operator for matrix multiplication (Max Gaukler)
44* Add eta() implementing the Dedekind eta function
45* Optimized the python_trailing function (adhoc-king)
46* Implement unary plus for matrices (Max Gaukler)
47* Improved calculation of gram_index (p15-git-acc)
48
49Compatibility:
50
51* Enable sage backend by default only if SAGE_ROOT is set (Pauli Virtanen)
52* Fix syntax warnings on CPython 3.8 (Sergey B Kirpichev)
53* Changed version requirements to Python 2.7 and 3.4 or later
54(Sergey B Kirpichev)
55* Improvements to the setup and test code (Sergey B Kirpichev)
56* Fix sys.version comparisons for compatibility with Python 3.10 (Jakub Wilk)
57* Fixes to Python2/3 compatibility for printing (Christian Clauss)
58
59Bug fixes:
60
61* Fix a possible division by zero in shanks() (Pascal Hebbeker)
62* Fixed indexing errors in deHoog, Knight & Stokes inverse laplace
63transform algorithm (Kris Kuhlman)
64* Corrected branch cuts of the elliprj() function in some cases
65* Fix initialization of iv.matrix from non-interval matrix (Max Gaukler)
66* Preserve function signatures in PrecisionManager (Viet Tran)
67* Implemented float and complex conversions for ivmpf
68(Jonathan Warner)
69* Fixed issue with scalar-matrix multiplication for interval matrices
70(Jonathan Warner)
71* Fix estimation of quadrature error with multiple subintervals (Tom Minka)
72* Fixed a problem with the defun decorators (Sergey B Kirpichev)
73* Fix eigenvalue sorting by absolute value (Georg Ostrovski)
74
75Cleanup:
76
77* Documentation corrections (Paul Masson, S.Y. Lee)
78* Remove inaccessible logic in fsum/fdot (Sergey B Kirpichev)
79* Remove broken force_type option for matrix constructor (Max Gaukler)
80* Fix text of the BSD license in LICENSE (Sergey B Kirpichev)
81* Minor code cleanup (Frédéric Chapoton)
82* Removed old, unused code
83
84
85--1.1.0--
86Released December 11, 2018
87
88Bugs:
89* Fixed severe bug in householder() for complex matrices
90(Michael Kagalenko)
91* Fixed frequently-reported bug where findroot() mysteriously raised
92UnboundLocalError (Sergey B Kirpichev)
93* Corrected rounding in binary-to-decimal conversion above 500 digits
94* Fixed minor loss of accuracy affecting rf(), ff(), binomial(), beta()
95* Fixed incorrect computation of the Hurwitz zeta function in some cases
96* Fixed accuracy of digamma function near 0
97* Fixed RuntimeError in qfac() in Python 3.7 caused by raising
98StopIteration (Zbigniew Jędrzejewski-Szmek)
99* Fix to allow NumPy arrays in fdot() (Nico Schlömer)
100
101Features and improvements:
102* Added more automatic conversions from Fraction, Decimal, NumPy types
103(Jonathan Warner)
104* Support creating mpf from a long literal (ylemkimon)
105* Implemented log1p()
106* Slight speedup of eig()
107* Implement polylog() for general complex s and z by using Hurwitz zeta
108algorithm as a fallback
109
110Library:
111* Test more CPython and PyPy versions (Sergey B Kirpichev, Aaron Meurer)
112* Drop support for Python 2.6 and 3.2 (Sergey B Kirpichev)
113* Use py.test for test code; lots of code cleanup (Sergey B Kirpichev)
114* Corrections to the documentation (Paul Masson, Connor Behan,
115Warren Weckesser, Aaron Meurer)
116
117--1.0.0--
118Released September 27, 2017
119
120* Bumped to major version number for 10 year anniversary
121* Added module for inverse Laplace transforms, including the top level
122function invertlaplace() as well as several different algorithms
123(Talbot, Gaver-Stehfest and de Hoog) implemented in
124mpmath.calculus.inverselaplace (Kris Kuhlman)
125* Fixed bugs in elliprg() giving incorrect values for certain input
126* Fixed wrong degree 1 nodes for Gaussian quadrature
127* Made make acot(0) and acoth(0) return a finite result
128* Fixed sieved zeta sum not being used in Python 3, and added cutoff
129for sieved zeta sum on 32-bit systems when too much memory would be used
130* Fixed zeta(0,0.5) to return correct value instead of raising
131NoConvergence exception
132* Added detection of exact zeros in gammainc(), in particular fixing
133NoConvergence error for gammainc(3,-1+1j)
134* Fixed wrong values from besseli() due to improper internal precision
135* Fixed bessely(0,1j) to return complex nan instead of raising NameError
136(Paul Masson)
137* Changed float() and complex() applied to an mpf or mpc to use rounding
138to nearest (or the context rounding mode) instead truncating
139* Fix imaginary part of gammainc(n,x), n negative odd int, x < 0
140* Added alternative "phase" color scheme to cplot()
141* Better error message for int(inf) or int(nan) (Aaron Meurer)
142* Fixed polyroots() with error=True
143* Added support to pass optional initial values to polyroots()
144(Michael Kagalenko)
145* Rewrote the Python major version selection to make it work if something
146else has redefined xrange (Arne Brys)
147* Switched documentation formula rendering to MathJax (Sergey B Kirpichev)
148* Fixed documentation TeX build (Sergey B Kirpichev)
149* Added PEP8 conformity testing (Sergey B Kirpichev)
150* Various fixes for the test code and test infrastructure on different
151platforms and Python versions (Sergey B Kirpichev)
152* Fixed module paths in setup.py (Aaron Meurer)
153* Documented more options for methods such as nstr() and hyper()
154* Miscellaneous corrections to the documentation (various)
155
156--0.19--
157Released June 10, 2014
158
159* Moved issue tracking to github and the main website to mpmath.org.
160Several URLs and issue numbers were updated in the documentation
161(Sergey B Kirpichev)
162* Enabled automatic testing with Travis CI (Sergey B Kirpichev)
163* Fixed many doctest issues (Sergey B Kirpichev)
164* Converted line endings to LF (Ondrej Certik)
165* Made polyroots() more robust (Ondrej Certik)
166
167--0.18--
168Released December 31, 2013
169
170Linear algebra:
171* added qr() for matrix QR factorization (contributed by Ken Allen)
172* added functions eigsy(), eighe(), eig() to compute matrix
173eigenvalues (contributed by Timo Hartmann)
174* added functions svd(), svd_r(), svd_c() for singular value
175decomposition of matrices (contributed by Timo Hartmann)
176* added calculation of Gaussian quadrature rules for various weight
177functions (contributed by Timo Hartmann)
178* improved precision selection in exp_pade() (contributed by
179Mario Pernici)
180
181Special functions:
182* fixed ellippi() to return an inf instead of raising an exception
183* fixed a crash in zeta() with huge arguments
184* added functions for computing Stirling numbers
185(stirling1(), stirling2())
186* improved the computation of zeros of zeta at high precision
187(contributed by Juan Arias de Reyna)
188* fixed zeta(-x) raising an exception for tiny x
189* recognize when lerchphi() can call zeta() or polylog(),
190handling those cases faster
191
192Compatibility:
193* fixed gmpy2 compatibility issues (contributed by Case Van Horsen)
194* better solutions for python 2/3 compatibility,
195using Benjamin Peterson's six.py
196* fixes to allow mpmath to run in non-sage mode when sage is available
197* support abstract base classes (contributed by Stefan Krastanov)
198* use new-style classes to improve pypy performance
199
200Other:
201* added Levin, Sidi-S and Cohen/Villegas/Zagier series
202transformations (contributed by Timo Hartmann)
203* added isfinite() utility function
204* fixed a problem with bisection root-finding
205* fixed several documentation errors
206* corrected number of coefficients returned by diffs() with
207method='quad'
208* fixed repr(constant) being slow at high precision
209* made intervals hashable
210
211--0.17--
212Released February 1, 2011
213
214Compatibility:
215
216* Python 3 is now supported
217* Dropped Python 2.4 compatibility
218* Fixed Python 2.5 compatibility in matrix slicing code
219* Implemented Python 3.2-compatible hashing, making mpmath numbers
220hash compatible with extremely large integers and with fractions
221in Python versions >= 3.2 (contributed by Case Vanhorsen)
222
223Special functions:
224
225* Implemented the von Mangoldt function (mangoldt())
226* Implemented the "secondary zeta function" (secondzeta()) (contributed
227by Juan Arias de Reyna).
228* Implemented zeta zero counting (nzeros()) and the Backlund S function
229(backlunds()) (contributed by Juan Arias de Reyna)
230* Implemented derivatives of order 1-4 for siegelz() and siegeltheta()
231(contributed by Juan Arias de Reyna)
232* Improved Euler-Maclaurin summation for zeta() to give more accurate
233results in the right half-plane when the reflection formula
234cannot be used
235* Implemented the Lerch transcendent (lerchphi())
236* Fixed polygamma function to return a complex NaN at complex
237infinity or NaN, instead of raising an unrelated exception.
238
239
240--0.16--
241Released September 24, 2010
242
243Backends and distribution:
244
245* Added Sage hooks for Cython versions of exp, ln, cos, sin,
246hypergeometric series, and some related functions
247* Fixed imports for gmpy2 compatibility (contributed by Case Van Horsen)
248* Removed documentation from main mpmath package to save space (a separate
249tar.gz file is now provided for the documentation sources)
250* Fixed matplotlib version detection
251* Converted files to Unix line endings
252
253Special functions:
254
255* Started adding plots of special functions to the documentation
256* Added Anger and Weber functions (angerj(), webere())
257* Added Lommel functions (lommels1(), lommels2())
258* Added interval versions of gamma(), loggamma(), rgamma() and
259factorial()
260* Rewritten Airy functions to improve speed and accuracy
261* Support for arbitrary-order derivatives of airyai(), airybi()
262* Added Airy function zeros (airyaizero(), airybizero())
263* Added Scorer functions (scorergi(), scorerhi())
264* Added computation of Bessel function zeros and Bessel function
265derivative zeros (besseljzero(), besselyzero())
266* Fixed besselj(mpc(n), z)
267* Rewritten lambertw() to fix various subtle bugs and robustly handle
268numerical difficulties near branch cuts and branch points.
269* Fixed fp.lambertw() to behave the same on branch cuts on systems with
270and without signed-zero floats
271* Added Carlson symmetric incomplete elliptic integrals
272(elliprf(), elliprc(), elliprj(), elliprd(), elliprg())
273* Added Legendre incomplete elliptic integrals (ellipf(), ellippi(),
274ellipe() with two arguments)
275* Implemented Parabolic cylinder functions (pcfd(), pcfu(), pcfv(),
276pcfw())
277* Implemented Euler-Maclaurin summation for hypergeometric functions
278of order (p,p-1) to support evaluation with z close to 1 in remaining cases
279* Fixed a bug in hypergeometric series summation, causing occasional
280inaccurate results and incorrect detection of zeros
281* Fixed qfrom(m=...)
282
283Calculus:
284
285* Implemented generators diffs_exp(), diffs_prod() for composing
286derivatives
287* Implemented Abel-Plana summation for infinite series (sumap())
288
289Basic arithmetic and functions:
290
291* Implemented matrix slice indexing, supporting submatrix
292extraction and assignment (contributed by Ioannis Tziakos)
293* Added missing constant fp.glaisher
294* Fixed a bug preventing internal rational numbers from being
295hashable
296* Fixed bug in isnpint()
297* Fixed a bug in cos_sin() for pure imaginary argument
298* Slightly improved performance for elementary functions of pure
299real or pure imaginary mpc inputs
300* Fixed plot() with real-valued mpc instances
301* Fixed cplot() to work with endpoints of other type than float/int
302
303
304--0.15--
305Released June 6, 2010
306
307Basic transcendental functions:
308
309* Reimplemented all elementary functions except log, reducing
310overhead and giving asymptotic speedups at high precision
311* Reimplemented gamma() and loggamma(), improving speed and
312fixing accuracy in corner cases
313* Added rgamma() (reciprocal gamma function)
314* Added a stress test suite for the gamma function
315* Provided top-level functions cos_sin() and cospi_sinpi() for fast
316simultaneous computation
317
318Riemann zeta function:
319
320* New zetazeros() implementation, supporting arbitrarily large indices
321(contributed by Juan Arias de Reyna)
322* Tuned algorithm selection in zeta() for complex arguments
323(contributed by Juan Arias de Reyna)
324* Accelerated computation of zeta function series using sieving
325
326Special functions:
327
328* Added qfrom(), qbarfrom(), mfrom(), kfrom(), taufrom() for elliptic
329argument conversion
330* Merged jsn(), jcn(), jdn() -> ellipfun() and generalized it to compute
331all 12 Jacobi elliptic functions
332* Implemented the Klein j-invariant (kleinj())
333* Implemented the q-Pochhammer symbol (qp())
334* Implemented q-factorial (qfac()) and q--gamma (qgamma())
335* Implemented q-hypergeometric series (qhyper())
336* Implemented bilateral hypergeometric series (bihyper())
337* Implemented Appell 2D hypergeometric series F2-F4 (appellf2()-appellf4())
338* Implemented generalized 2D hypergeometric series (hyper2d())
339* Fixed gammainc() for integer-valued complex argument (contributed by
340Juan Arias de Reyna)
341* Fixed asymptotic expansion of hyp1f1() (contributed by Juan Arias de Reyna)
342
343Numerical calculus:
344
345* Added support for multidimensional series in nsum()
346* Made nprod() faster by default by extrapolating directly instead of
347calling nsum()
348* Changed some options for diff()/diffs()
349* Made taylor() chop tiny coefficients by default
350* Added support for partial derivatives in diff()
351
352Interval arithmetic:
353
354* All interval arithmetic functionality moved to a separate context
355namespace (iv)
356* Preliminary support for complex intervals (iv.mpc)
357* Fixed interval cos/sin to support intervals overlapping zeros/extreme points
358* Implemented interval atan2
359* Implemented exp/log/cos/sin for complex intervals
360* Some other interface changes to interval code
361
362Utility functions:
363
364* Made chop() use relative rather than absolute tolerance for
365real/imaginary parts
366* Optimized floor(), ceil(), isinf(), isnan(), isint()
367* Implemented nint(), frac(), isnormal()
368* Fixed and documented semantics for isinf(), isin(), isnan()
369* Added utility functions autoprec(), maxcalls(), memoize()
370
371Miscellaneous tweaks and fixes:
372
373* Support complex conjugation in fdot()
374* Added support for Cholesky decomposition of complex matrices
375* Fixed a small precision bug in linear algebra functions
376* Suppress NoConvergence exception when plotting
377* Removed some dirty code to improve PyPy compatibility
378* Fixed plotting to work with mpmath numbers in the interval specification
379* Fixed fp arithmetic on systems where math.log and math.sqrt return NaN
380instead of raising an exception
381* Fixed fp.conj for Python 2.4 and 2.5
382* Fixed quadrature to work with reversed infinite intervals such as [0,-inf]
383* Renamed modf() -> fmod() for consistency
384
385--0.14--
386Released February 5, 2010
387
388General changes:
389
390* Fully separated the code into "low-level" and "high-level", permitting the
391use of alternative contexts (the mpmath.mp object provides the default
392implementation)
393* Implemented a context for fast double-precision arithmetic using Python
394types (mpmath.fp)
395* Implemented hooks for importing a faster version of mp arithmetic from Sage
396* Implemented optimized fp versions of certain functions (including erf, erfc,
397gamma, digamma, ei, e1)
398* Renamed and reorganized various internal modules and methods (including
399merging low-level modules into mpmath.libmp). This should not affect most
400external code using top-level imports.
401
402Plotting:
403
404* Implemented splot() for 3D surface plots (contributed by Jorn Baayen)
405* Permit calling plot functions with custom axes (contributed by Jorn Baayen)
406
407Matrices:
408
409* Fixed lu_solve for overdetermined systems (contributed by Vinzent Steinberg)
410* Added conjugate matrix transpose (contributed by Vinzent Steinberg)
411* Implemented matrix functions (expm, cosm, sinm, sqrtm, logm, powm)
412
413Miscellaneous:
414
415* Prettier printing of numbers with leading zeros at small precisions
416* Made nstr pass on kwargs, permitting more formatting options
417* Fixed wrong directed rounding of addition of numbers with large magnitude
418differences
419* Fixed several docstring typos (contributed by Chris Smith)
420* Fixed a bug that prevented caching of quadrature nodes to work optimally.
421
422Special functions:
423
424* Implemented fast evaluation for large imaginary heights of the Riemann zeta
425function, Z function and derived functions using the Riemann-Siegel
426(contributed by Juan Arias de Reyna)
427* Unified the zeta() and hurwitz() functions, automatically selecting a fast
428algorithm
429* Improved altzeta() to fall back to zeta() for large arguments
430* Fixed accuracy of zeta(s) for s ~= 1
431* Implemented exact evaluation of Euler numbers (contributed by Juan Arias
432de Reyna)
433* Implemented numerical evaluation of Euler numbers and Euler polynomials
434(eulernum(), eulerpoly())
435* Fixed bernpoly() and eulerpoly() to compute accurate values for large
436parameters
437* Fixed accuracy problems for hypergeometric functions with large parameters
438* Faster evaluation of hypergeometric series using on-the-fly code generation
439* Optimized hypercomb to detect certain zero terms symbolically
440* Removed the djtheta function (jtheta() accepts a derivative parameter)
441* Implemented li(x, offset=True) to compute the offset logarithmic integral
442* Fixed wrong branch in Lambert W function for certain complex inputs
443* Implemented the reflection formula for the Barnes G-function,
444superfactorials, hyperfactorials, permitting large arguments in the left
445half-plane
446* Implemented analytic continuation to |z| >= 1 for hypergeometric functions
447pFq with p=q+1; added hyp3f2()
448* Implemented Borel summation of divergent pFq functions with p > q+1
449* Implemented automatic degree reduction of hypergeometric functions with
450repeated parameters
451* Added convenience functions expj(), expjpi()
452* Use Mathematica's convention for the continuation of the Meijer G-function
453* Added phase(), polar(), rect() functions for compatibility with the
454Python 2.6 cmath module
455* Implemented spherical harmonics (spherharm())
456* Optimized ci(), si(), chi(), shi() for complex arguments by evaluating
457them in terms of ei()
458* Optimized hyp2f1 for z ~= -1
459
460--0.13--
461Released August 13, 2009
462
463New special functions:
464
465* The generalized exponential integral E_n (expint(), e1() for E_1)
466* The generalized incomplete beta function (betainc())
467* Whittaker functions (whitm(), whitw())
468* Struve functions (struveh(), struvel())
469* Kelvin functions (ber(), bei(), ker(), kei())
470* Cyclotomic polynomials (cyclotomic())
471* The Meijer G-function (meijerg())
472* Clausen functions (clsin(), clcos())
473* The Appell F1 hypergeometric function of two variables (appellf1())
474* The Hurwitz zeta function, with nth order derivatives (hurwitz())
475* Dirichlet L-series (dirichlet())
476* Coulomb wave functions (coulombf(), coulombg(), coulombc())
477* Associated Legendre functions of 1st and 2nd kind (legenp(), legenq())
478* Hermite polynomials (hermite())
479* Gegenbauer polynomials (gegenbauer())
480* Associated Laguerre polynomials (laguerre())
481* Hypergeometric functions hyp1f2(), hyp2f2(), hyp2f3(), hyp2f0(), hyperu()
482
483Evaluation of hypergeometric functions:
484
485* Added the function hypercomb() for evaluating expressions containing
486hypergeometric series, with automatic handling of limits
487* The available hypergeometric series (of orders up to and including 2F3)
488implement asymptotic expansions with respect to the last argument z, allowing
489fast and accurate evaluation anywhere in the complex plane. A massive number
490of functions, including Bessel functions, error functions, etc., have been
491updated to take advantage of this to support fast and accurate evaluation
492anywhere in the complex plane.
493* Fixed hyp2f1 to handle z close to and on the unit circle (supporting
494evaluation anywhere in the complex plane)
495* hyper() handles the 0F0 and 1F0 cases exactly
496* hyper() eventually raises NoConvergence instead of getting stuck in
497an infinite loop if given a divergent or extremely slowly convergent series
498
499Other improvements and bug fixes to special functions:
500
501* gammainc is much faster for large arguments and avoids catastrophic
502cancellation
503* Implemented specialized code for ei(x), e1(x), expint(n,x) and gammainc(n,x)
504for small integers n, making evaluation much faster
505* Extended the domain of polylog
506* Fixed accuracy for asin(x) near x = 1
507* Fast evaluation of Bernoulli polynomials for large z
508* Fixed Jacobi polynomials to handle some poles
509* Some Bessel functions support computing nth order derivatives
510* A set of "torture tests" for special functions is available as
511tests/torture.py
512
513Other:
514* Implemented the differint() function for fractional differentiaton / iterated
515integration
516* Added functions fadd, fsub, fneg, fmul, fdiv for high-level arithmetic with
517controllable precision and rounding
518* Added the function mag() for quick order-of-magnitude estimates of numbers
519* Implemented powm1() for accurate calculation of x^y-1
520* Improved speed and accuracy for raising a pure imaginary number to
521an integer power
522* nthroot() renamed to root(); root() optionally computes any of
523the non-principal roots of a number
524* Implemented unitroots() for generating all (primitive) roots of unity
525* Added the mp.pretty option for nicer repr output
526
527--0.12--
528Released June 9, 2009
529
530General
531* It is now possible to create multiple context objects and use context-local
532methods instead of global state/functions (e.g. mp2=mp.clone(); mp2.dps=50;
533mp2.cos(3)). Not all functions have been converted to context methods, and
534there are some bugs, so this feature is currently experimental.
535* If mpmath is installed in Sage 4.0 or later, mpmath will now use sage.Integer
536instead of Python long internally.
537* Removed instances of old-style integer division from the codebase.
538* runtests.py can be run with -coverage to generate coverage statistics.
539
540Types and basic arithmetic
541
542* Fixed comparison with -inf.
543* Changed repr format of the mpi interval type to make eval(repr(x)) == x.
544* Improved printing of intervals, with configurable output format (contributed
545by Vinzent Steinberg based on code by Don Peterson).
546* Intervals supported by mpmathify() and nstr() (contributed by Vinzent
547Steinberg).
548* mpc is now hashable.
549* Added more formatting options to the internal function to_str.
550* Faster pure-Python square root.
551* Fix trailing whitespace giving wrong values in str->mpf conversion.
552
553Calculus
554
555* Fixed nsum() with Euler-Maclaurin summation which would previously
556ignore the starting index and sum from n=1.
557* Implemented Newton's method for findroot() (contributed by Vinzent
558Steinberg).
559
560Linear algebra
561
562* Fixed LU_decomp() to recognize singular matrices (contributed by Jorn Baayen).
563* The various norm functions were replaced by the generic vector norm
564function norm(x,p) and the generic matrix norm function mnorm(x,p).
565
566Special functions:
567
568* Some internal caches were changed to always slightly overallocate
569precision. This fixes worst-case behavior where previously the cached
570value had to be recomputed on every function call.
571* Fixed log(tiny number) returning nonsense at high precision.
572* Fixed gamma() and derivative functions such as binomial() returning
573wrong results at integer inputs being divisible by a large power of 2.
574* Fixed asin() not to raise an exception at high precision (contributed
575by Vinzent Steinberg).
576* Optimized the AGM code for the natural logarithm, making the previously
577used Newton method at intermediate precisions obsolete.
578* The arithmetic-geometric mean function agm() is now an order of magnitude
579faster at low precision.
580* Faster implementations of ellipk() and ellipe().
581* Analytic continuation of ellipe() to |x| >= 1 implemented.
582* Implemented the log gamma function (loggamma()) with correct branch
583cuts (slow, placeholder implementation).
584* Fixed branch cuts of hyperfac().
585* Implemented the Riemann-Siegel Z-function (siegelz()).
586* Implemented the Riemann-Siegel theta function (siegeltheta()).
587* Implemented calculation of Gram points (grampoint()).
588* Implemented calculation of Riemann zeta function zeros (zetazero()).
589* Implemented the prime counting function: a slow, exact version (primepi()).
590and a fast approximate version (primepi2()) that gives a bounding interval.
591* Implemented the Riemann R prime counting function (riemannr()).
592* Implemented Bell numbers and polynomials (bell()).
593* Implemented the expm1() function.
594* Implemented the 'polyexponential function' (polyexp()).
595* Implemented the twin prime constant (twinprime) and Mertens' constant
596(mertens).
597* Implemented the prime zeta function (primezeta()).
598
599
600--0.11--
601Released January 26, 2009
602
603General:
604
605* Most of the documentation is now generated from docstrings
606using Sphinx' autodoc feature, and proper LaTeX is used
607for mathematical formulas. A large amount of new documentation
608has been written.
609* Improved gmpy backend. Using gmpy-1.04 gives a ~30% unit tests
610speedup over 1.03, with speedups in the range of 2-3x for
611specific operations (contributed by Case van Horsen and
612Mario Pernici).
613* Mpmath imports slightly faster due to not trying to
614load the 'random' library
615
616Numerical calculus, etc:
617
618* Implemented a fast high-precision ODE solver (to replace the slow
619and low-accuracy RK4 algorithm) (odefun())
620* Created an intelligent function nsum() to replace sumrich/sumsh
621* Implemented nprod() for computing infinite products
622* Rewrote limit() to use the same adaptive extrapolation algorithm
623as nsum()
624* Multidimensional nonlinear solving with Newton's method
625implemented in findroot() (contributed by Vinzent Steinberg)
626* Simplified the implementation and interface of sumem()
627* Reimplemented Shanks transformation for nsum using Wynn's epsilon
628algorithm (shanks())
629* Reimplemented Richardson extrapolation slightly more simply and
630efficiently (richardson())
631* Prevent shanks() from exiting prematurely by adding
632random noise to zeros
633* Removed the obsolete secant() function (see findroot())
634* Implemented high-order derivatives (diff(), diffs())
635* Implemented calculation of Taylor series (taylor())
636* Implemented calculation of Fourier series (fourier(), fourierval())
637* Implemented Pade approximation (pade()) (contributed by
638Mario Pernici)
639* Better cancel condition for findroot() (contributed by
640Vinzent Steinberg)
641* Some refactoring of numerical integration code
642* Fix erroneous nodes for 0-th order Gauss-Legendre quadrature,
643which was causing unnecessary slowness
644* Quadrature nodes are cached for arbitrary intervals, giving a
64530% speedup for repeated integrations
646* Unified interface and added more options for identify(), pslq(), findpoly()
647
648New special functions:
649
650* Implemented polylogarithms (polylog())
651* Implemented Bernoulli polynomials (bernpoly())
652* Implemented the Barnes G-function (barnesg())
653* Implemented double factorials (fac2())
654* Implemented superfactorials (superfac())
655* Implemented hyperfactorials (hyperfac())
656* Replaced lower_gamma and upper_gamma with a more versatile
657function gammainc() for computing the generalized (and optionally
658regularized) incomplete gamma function
659* Implemented sinc() and sincpi()
660* Implemented Fibonacci numbers (fib())
661* Implemented the Dirichlet eta function (altzeta())
662* Implemented the inverse error function (erfinv())
663* Jacobi theta functions and elliptic functions were essentially
664rewritten from scratch, making them much faster and more
665general. Renamed Jacobi theta functions: jacobi_theta -> jtheta,
666etc. (contributed by Mario Pernici)
667* Implemented derivatives of jtheta (djtheta) (contributed by
668Mario Pernici)
669* Implemented Bessel Y, I, K functions (bessely, besseli,
670besselk; Bessel J functions were also renamed to besselj)
671also renamed)
672* Generalized Stieltjes constants can now be computed,
673with stieltjes(n,a)
674* Implemented Hankel functions (hankel1, hankel2)
675
676Speed improvements and bugfixes to special functions:
677* Fast logarithm at very high precision using the formula by
678Sasaki and Kanada (contributed by Mario Pernici)
679* Slightly faster logarithm at low precision (contributed by
680Mario Pernici)
681* Faster exponential function at high precision, using
682Newton's method (contributed by Mario Pernici)
683* Faster computation of ln2 and ln10 by means of binary splitting
684(contributed by Mario Pernici)
685* Fixed accuracy problems in sinpi() and cospi()
686* Correct evaluation of beta() at limits
687* Much faster evaluation of stieltjes(n), using an improved integral
688formula
689* Fixed bernoulli() being inaccurate for large n and low precision,
690and being needlessly slow for small n and huge precision
691* Fixed accuracy of zeta(s) for large negative re(s)
692* Fixed accuracy problems for asinh, atanh and tanh
693* Fixed accuracy of airyai() for large x.real
694* Fixed bug in nthroot() for very large arguments (contributed by
695Mario Pernici)
696* Fixed accuracy of log(x) for complex |x| ~= 1
697* Fixed accuracy of exp(n), n a huge integer and prec >= 600
698* Slightly faster hypergeometric functions with rational parameters
699(contributed by Mario Pernici)
700* Faster and more accurate calculation of ci(x), si(x)
701* Faster and more accurate calculation of ei(x) for large x,
702using an asymptotic expansion (contributed by Mario Pernici)
703* Fixed accuracy bugs in theta functions (contributed by
704Mario Pernici)
705* The Lambert W function returns more appropriate values at infinities
706
707Arithmetic and basic interface:
708* Square roots are now rounded correctly
709* Made float(huge) -> inf and float(1/huge) -> 0 instead of
710raising OverflowError
711* Renamed convert_lossless -> mpmathify
712* mpmathify() accepts strings representing fractions or complex
713numbers (contributed by Vinzent Steinberg)
714* Fixed a bug in interval multiplication giving wrong signs
715* Added monitor() to monitor function evaluation
716* Implemented a chop() utility function for deletion of numerical noise
717* Added re(), im(), conj(), fabs(), mpf.conjugate()
718* Fixed the != operator for intervals
719* Added functions fsum, fprod, fdot for efficient computation of
720sums, products and dot products of lists of mpf:s or mpc:s
721
722Matrices:
723
724* Generation of Hilbert matrices (hilbert()) (contributed by
725Vinzent Steinberg)
726* Added lu_solve_mat() to solve a*x=b where a and b are matrices (contributed
727by Mario Pernici)
728* Implemented computation of matrix exponentials (exp_pade()) (contributed
729by Mario Pernici)
730* Prettier repr of complex matrices (contributed by Vinzent Steinberg)
731* Speedups by using fdot and fsum (contributed by Vinzent Steinberg)
732
733--0.10--
734Released October 15, 2008
735
736Interface / general:
737* Mpmath now works with Python 2.6
738* Implemented function plotting via 'plot' and 'cplot' (requires
739matplotlib)
740* Removed global rounding mode (always rounding to nearest by default)
741* Instead added 'prec', 'dps', 'rounding' keyword arguments to
742standard functions, for optional fine-grained control over precision
743and rounding
744* Implemented isinf, isnan, isint, utility functions
745* A large number of internal functions were moved and/or renamed to
746improve consistency. This particularly affects low-level mpf
747functions (lib.fadd -> libmpf.mpf_add, etc).
748* Syntax for some operations was changed (see details below)
749* The test runner (runtests.py) was updated to support running
750isolated tests and to allow a local import of mpmath
751* Unit tests can now be run with import mpmath; mpmath.runtests()
752* Implicit imports are no longer used internally in the main codebase.
753(This will hopefully make the source easier to read, and can catch
754installation problems more cleanly.)
755
756Added linear algebra functions (contributed by Vinzent Steinberg):
757* Provided a matrix class
758* Computation of powers, inverses, determinants
759* Linear system solving using LU, QR and Cholesky
760* Vector and matrix norms
761* Calculation of condition numbers
762
763Improvements to interval arithmetic:
764* Fixed rounding direction for negative numbers and related
765spurious bugs
766* Fix interval exponentiation (all cases should work now)
767* Basic interval arithmetic is up to 10x faster
768* sqrt, exp, log, sin, cos and a few other functions
769accept interval arguments
770* Intervals supported in matrices
771
772Changes to root-finding code:
773* secant renamed to findroot
774* findroot was made more general; many useful alternative root-finding
775algorithms were implemented (contributed by Vinzent Steinberg)
776
777Improvements to special functions:
778* Implemented polygamma functions
779* Implemented harmonic numbers
780* Implemented Stieltjes constants
781* Made gamma more accurate for huge arguments and/or precision
782* Made zeta more accurate in various cases
783* Made zeta typically 2-5x faster
784* Much more efficient computation of zeta for huge s (zeta(s) ~= 1)
785* Optimized numerical calculation of Bernoulli numbers
786* Fast exact calculation of huge Bernoulli numbers via zeta and the
787von Staudt-Clausen theorem
788* Using AGM to compute ellipk, which is much faster and works
789in the entire complex plane
790* Allow single-argument form agm(x) = agm(1,x)
791* Faster and more accurate computation of erf
792* Added fast and accurate implementation of erfc
793* Normal probability functions npdf, ncdf
794* Fixed directed rounding in corner cases for various functions
795
796Improvements to numerical integration:
797* Changed syntax for integration (quad(f, [a, b], options))
798* Implemented Gauss-Legendre quadrature
799* Direct support for triple integrals (quad(f, X, Y, Z))
800* Interval can be a list of several points, to split integration
801into subintervals
802* Oscillatory quadrature uses Gauss-Legendre instead of tanh-sinh,
803since this is typically faster
804* Fixed minor rounding bug in tanh-sinh quadrature not giving
805complete symmetry in the nodes
806* Implemented quadrature rules in classes for improved extensibility
807
808Various speed improvements:
809* Up to 3x faster computation of log(x) at low precision, due to using
810Taylor series with argument reduction and partial caching
811* About 2x faster log(x) at very high precision due to more efficient
812computation of exp in the Newton iteration
813* Up to 10x faster computation of atan(x) at low to medium precision,
814due to using Taylor series with argument reduction and partial caching
815* Faster pickling due to using hex() instead of long()
816* Optimized code for Khinchin's constant (2.5x faster at 1000 digits)
817* Optimized code for Glaisher's constant (1.5x faster at 1000 digits)
818* Faster algorithm for Euler's constant (10x faster at 10000 digits)
819* Rewrote PSLQ to use fixed-point arithmetic, giving a ~7x speedup
820in pslq, findpoly and identify
821
822Miscellaneous bugfixes:
823* Fixed nthroot for n = -1, 0, 1
824* Fixed inf/2**n and nan/2**n returning zero
825
826--0.9--
827Released August 23, 2008
828
829* gmpy mpzs are used instead of python ints when available, for
830huge speedups at high precision (contributed by Case Van Horsen)
831* using binary splitting to compute pi and e near-optimally
832* mpmath includes __version__ information
833* arange behaves more like range (contributed by Vinzent Steinberg)
834* asymptotically faster trigonometric functions via Brent's trick
835(contributed by Mario Pernici)
836* asymptotically faster inverse trigonometric functions via Newton's
837method (contributed by Mario Pernici)
838* added Jacobi elliptic functions 1-4, sn, cn, dn (contributed by Mike
839Taschuk)
840* polyval, polyroots and related functions now use the same order
841for coefficients as scipy and matlab (i.e. the reverse order of what
842was used previously in mpmath)
843* fixed polyroots for degree-0 polynomials (contributed by Nimish Telang)
844* added convenience functions (log10, degrees, radians, frexp, modf, ln,
845arg, sign)
846* added fast cbrt and nthroot functions for computing nth roots
847(contributed by (Mario Pernici)
848* added various exponential integrals (ei, li, si, ci, shi, chi, erfi)
849* added airy functions (airyai, airybi)
850* more __op__ and __rop__ methods return NotImplemented where
851appropriate
852* external classes can define a special method _mpmath_ to interact
853with mpmath numbers and functions
854* fixed some corner cases in atan2
855* faster rand()
856
857--0.8--
858Released April 20, 2008
859
860New features:
861* the full set of reciprocal trigonometric and hyperbolic functions
862and their inverses (cotangent, secant, etc) is available
863* oscillatory quadrature algorithm
864* the PSLQ algorithm and constant recognition functions
865* Richardson and Shanks transformations for computing limits and series
866* Euler-Maclaurin summation of series
867* basic ODE solvers (contributed by Ondrej Certik)
868* the Lambert W function
869* arithmetic-geometric mean function
870* generic hypergeometric series and some special hypergeometric
871functions (elliptic integrals, orthogonal polynomials)
872* several more mathematical constants
873* fast sequential computation of integer logarithms and Bernoulli
874numbers
875* Bessel function jv works for complex arguments and noninteger v
876* support for trapping complex results
877* using Sphinx to generate HTML documentation
878
879Bugfixes, speed enhancements, and other improvements:
880* compatibility tests should now pass on systems where Python is
881compiled to use 80-bit registers for floating-point operations
882* fixed mpmath to work with some versions of Python 2.4 where a
883list indexing bug is present in the Python core
884* better algorithms for various complex elementary functions
885(tan and tanh by Fredrik; sqrt, acos, asin, acosh and asinh
886improved by Mario Pernici)
887* multiplication and integer powers for complex numbers is faster
888and more accurate
889* miscellaneous speed improvements to complex arithmetic (contributed
890by Mario Pernici)
891* faster computation of cos and sin when only one of them is needed
892(contributed by Mario Pernici)
893* slightly faster square roots at low precision (contributed by
894Mario Pernici)
895* fixed computation of exp(n) for negative integers and x**y for
896negative half integers y
897* mpf ** complex now works
898* faster generation of quadrature nodes (contributed by Mario Pernici)
899* faster change of variables for quadrature
900* comparisons and conversions have been optimized slightly.
901comparisons with float(nan) also work as intended.
902* str() is several times faster at very high precision
903* implementations of most elementary functions moved to the lib
904and libmpc modules for cleaner separation of functionality
905* the rounding argument for lib and libmpc functions, and for
906some functions also the the prec argument, are now optional,
907resulting in cleaner and slightly faster lib code
908* gamma and factorial are about 2x faster
909* polyroots returns nicer results
910* pickling now works for mpf and mpc instances
911
912--0.7--
913Released March 12, 2008
914
915* the interface for switching precision and rounding modes has been
916changed. instead of changing mpf.prec, there is a new object mp
917which holds the precision as mp.prec. this change improves
918flexibility in the implementation. it will unfortunately break
919any existing code written for mpmath, but the broken code should
920be trivial to update.
921* the functions workprec, workdps, extraprec, extradps have been
922introduced for switching precision in a more safe manner,
923ensuring that the precision gets reset when finished. they can
924be used with the 'with' statement available in python 2.5
925* improved documentation (manual.html)
926* the round-half-down and round-half-up modes have been deprecated,
927since they added complexity without being particularly useful.
928round-half-even has been renamed to round-nearest.
929* implemented the functions nstr, nprint for printing numbers with
930a small or custom number of digits
931* accuracy of cos and sin near roots has been fixed. computing
932sin(x) or cos(x) where x is huge is also much faster
933* implemented a magical constant eps that gives the "machine"
934epsilon
935* additional mathematical functions: implemented Catalan's constant
936and Bessel functions J_n(x) for integer n and real x
937* new functions diff and diffc for numerical differentiation
938* implemented the ldexp function for fast multiplication by 2**n
939* mpf uses rich comparison methods (contributed by Pearu Peterson)
940* epydoc-friendly docstrings (contributed by Pearu Peterson)
941* support creating mpf from float nan or inf
942* fixed printing of complex numbers with negative imaginary part
943* flattened package structure to simplify inclusion of mpmath in other
944packages
945* external classes can interoperate with mpf and mpc instances
946by defining _mpf_ or _mpc_ properties
947* renamed lib.fpow -> lib.fpowi and implemented lib.fpow for general
948real powers. <mpf> ** <mpf> should now be slightly faster and more
949robust
950* the internal number representation has been changed to include
951an explicit sign bit. as a result of this change and other small
952tweaks, arithmetic is up to 20% faster and the total running
953time for mpmath's unit tests has dropped 10%.
954* miscellaneous speed improvements:
955* <mpf> ** <int> is 2-3 times faster (contributed by Mario Pernici)
956* <mpf> * <int> and <int> * <mpf> is roughly twice as fast
957* <int> / <mpf> is roughly twice as fast (contributed by Mario
958Pernici)
959* exp and log are about 10% faster
960* fast computation of e and exp(n) when precision is extremely high
961
962--0.6--
963Released January 13, 2008
964
965* added the mpi type for interval arithmetic
966* powers with integer exponents are computed with directed rounding
967all the way through to preserve interval bounds more robustly
968(however, the code is not fully tested and may have some bugs)
969* string input to mpf.__new__() can now be unicode
970* mpf.__eq__ now works in pypy
971* infs and nans are now implemented in mpmath.lib, resulting in
972considerable simplification of the mpf class implementation
973* partial support for infs and nans in functions, e.g.
974exp(inf) -> inf and exp(-inf) -> 0 now work.
975* renamed several files. created mpmath.apps and moved tests into
976the main mpmath directory
977* wrote script to permit running unit tests without py.test available
978* improved bit counting code in fadd, fmul and fdiv, plus other
979small performance tweaks, resulting in a 20-30% speedup for
980arithmetic
981
982--0.5--
983Released November 24, 2007
984
985* added the quad module for arbitrary-precision numerical integration
986* floor and ceil functions available
987* implemented __mod__ and __rmod__ for the mpf class
988* partial support for the special numbers +inf, -inf and nan
989* faster multiplication and division (up to 40% faster with psyco)
990* simplified syntax for conversion function (from_int instead of
991from_int_exact, etc)
992* renamed cgamma to euler
993* more documentation strings
994
995--0.4--
996Released November 3, 2007
997
998* new string conversion code (much faster; unlimited exponents)
999* fixed bug in factorial (it gave the wrong value, though gamma worked)
1000* division now uses a rigorous algorithm for directed rounding
1001(mpmath previously used a heuristic that got the last bit wrong
1002in 1/10000 of cases)
1003* misc. performance improvements (arithmetic is 15% faster)
1004* refactored parts of the code; added many more docstrings and tests
1005* added a function rand() for generating full-precision random numbers
1006* rewrote the benchmark script to compare against Decimal and to
1007automatically generate timings with psyco both disabled and enabled
1008* rewrote unit tests to use py.test
1009
1010--0.3--
1011Released October 5, 2007
1012
1013* fixed high-precision accuracy problem in complex sqrt
1014* fixed high-precision accuracy problem in atan and complex log
1015* fixed directed rounding for sqrt (always rounded to nearest)
1016* implemented all hyperbolic and inverse functions (there are some
1017accuracy issues left to sort out)
1018* included gamma, factorial, erf, zeta incomplete gamma functions
1019* made sin and tan more accurate for complex input very close to 0
1020* more docstrings
1021* many more tests
1022* including a benchmark script
1023
1024-- 0.2 --
1025Released October 2, 2007
1026
1027* 50% faster exponential function
1028* faster mpf <-> int ops
1029* fixed import error in pidigits.py; added demos to source distribution
1030* __rmul__ was missing on mpf
1031* fixed bitcount bug also for -(2**n-1)
1032* more docstrings
1033* more tests; tests included in source distribution
1034* approximate equality testing (.ae method) supported
1035* implemented atan and atan2 functions
1036* tan works for both mpfs and mpcs
1037* complex logarithms and complex powers supported
1038* more details in README
1039
1040-- 0.1 --
1041Released September 27, 2007
1042
1043* imported code from SymPy's numerics module
1044* renamed functions and restructured various parts of the code
1045* fixed erroneous bitcount for 2**n-1 mantissa with directed rounding
1046* various small speed improvements and bug fixes
1047