mpmath

Форк
0
/
CHANGES 
1046 строк · 44.2 Кб
1
--1.3.0--
2
Released March 7, 2023
3

4
Security issues:
5

6
* Fixed ReDOS vulnerability in mpmathify() (CVE-2021-29063) (Vinzent Steinberg)
7

8
Features:
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()
17
  sigmoidw()) (Nike Dattani, Deyan Mihaylov, Tina Yu)
18

19
Bug 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

29
Maintenance:
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--
39
Released February 1, 2021
40

41
Features 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

49
Compatibility:
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

59
Bug fixes:
60

61
* Fix a possible division by zero in shanks() (Pascal Hebbeker)
62
* Fixed indexing errors in deHoog, Knight & Stokes inverse laplace
63
  transform 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

75
Cleanup:
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--
86
Released December 11, 2018
87

88
Bugs:
89
* Fixed severe bug in householder() for complex matrices
90
  (Michael Kagalenko)
91
* Fixed frequently-reported bug where findroot() mysteriously raised
92
  UnboundLocalError (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
98
  StopIteration (Zbigniew Jędrzejewski-Szmek)
99
* Fix to allow NumPy arrays in fdot() (Nico Schlömer)
100

101
Features 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
108
  algorithm as a fallback
109

110
Library:
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,
115
  Warren Weckesser, Aaron Meurer)
116

117
--1.0.0--
118
Released 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
122
  function invertlaplace() as well as several different algorithms
123
  (Talbot, Gaver-Stehfest and de Hoog) implemented in
124
  mpmath.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
129
  for 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
131
  NoConvergence exception
132
* Added detection of exact zeros in gammainc(), in particular fixing
133
  NoConvergence 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
138
  to 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
146
  else 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
151
  platforms 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--
157
Released June 10, 2014
158

159
* Moved issue tracking to github and the main website to mpmath.org.
160
  Several 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--
168
Released December 31, 2013
169

170
Linear algebra:
171
* added qr() for matrix QR factorization (contributed by Ken Allen)
172
* added functions eigsy(), eighe(), eig() to compute matrix
173
  eigenvalues (contributed by Timo Hartmann)
174
* added functions svd(), svd_r(), svd_c() for singular value
175
  decomposition of matrices (contributed by Timo Hartmann)
176
* added calculation of Gaussian quadrature rules for various weight
177
  functions (contributed by Timo Hartmann)
178
* improved precision selection in exp_pade() (contributed by
179
  Mario Pernici)
180

181
Special 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(),
190
  handling those cases faster
191

192
Compatibility:
193
* fixed gmpy2 compatibility issues (contributed by Case Van Horsen)
194
* better solutions for python 2/3 compatibility,
195
  using 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

200
Other:
201
* added Levin, Sidi-S and Cohen/Villegas/Zagier series
202
  transformations (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
207
  method='quad'
208
* fixed repr(constant) being slow at high precision
209
* made intervals hashable
210

211
--0.17--
212
Released February 1, 2011
213

214
Compatibility:
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
220
  hash compatible with extremely large integers and with fractions
221
  in Python versions >= 3.2 (contributed by Case Vanhorsen)
222

223
Special functions:
224

225
* Implemented the von Mangoldt function (mangoldt())
226
* Implemented the "secondary zeta function" (secondzeta()) (contributed
227
  by 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
233
  results in the right half-plane when the reflection formula
234
  cannot be used
235
* Implemented the Lerch transcendent (lerchphi())
236
* Fixed polygamma function to return a complex NaN at complex
237
  infinity or NaN, instead of raising an unrelated exception.
238

239

240
--0.16--
241
Released September 24, 2010
242

243
Backends and distribution:
244

245
* Added Sage hooks for Cython versions of exp, ln, cos, sin,
246
  hypergeometric 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
249
  tar.gz file is now provided for the documentation sources)
250
* Fixed matplotlib version detection
251
* Converted files to Unix line endings
252

253
Special 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
259
  factorial()
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
265
  derivative zeros (besseljzero(), besselyzero())
266
* Fixed besselj(mpc(n), z)
267
* Rewritten lambertw() to fix various subtle bugs and robustly handle
268
  numerical difficulties near branch cuts and branch points.
269
* Fixed fp.lambertw() to behave the same on branch cuts on systems with
270
  and 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(),
274
  ellipe() with two arguments)
275
* Implemented Parabolic cylinder functions (pcfd(), pcfu(), pcfv(),
276
  pcfw())
277
* Implemented Euler-Maclaurin summation for hypergeometric functions
278
  of 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
280
  inaccurate results and incorrect detection of zeros
281
* Fixed qfrom(m=...)
282

283
Calculus:
284

285
* Implemented generators diffs_exp(), diffs_prod() for composing
286
  derivatives
287
* Implemented Abel-Plana summation for infinite series (sumap())
288

289
Basic arithmetic and functions:
290

291
* Implemented matrix slice indexing, supporting submatrix
292
  extraction and assignment (contributed by Ioannis Tziakos)
293
* Added missing constant fp.glaisher
294
* Fixed a bug preventing internal rational numbers from being
295
  hashable
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
299
  real 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--
305
Released June 6, 2010
306

307
Basic transcendental functions:
308

309
* Reimplemented all elementary functions except log, reducing
310
  overhead and giving asymptotic speedups at high precision
311
* Reimplemented gamma() and loggamma(), improving speed and
312
  fixing 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
316
  simultaneous computation
317

318
Riemann 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

326
Special functions:
327

328
* Added qfrom(), qbarfrom(), mfrom(), kfrom(), taufrom() for elliptic
329
  argument conversion
330
* Merged jsn(), jcn(), jdn() -> ellipfun() and generalized it to compute
331
  all 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
340
  Juan Arias de Reyna)
341
* Fixed asymptotic expansion of hyp1f1() (contributed by Juan Arias de Reyna)
342

343
Numerical calculus:
344

345
* Added support for multidimensional series in nsum()
346
* Made nprod() faster by default by extrapolating directly instead of
347
  calling 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

352
Interval arithmetic:
353

354
* All interval arithmetic functionality moved to a separate context
355
  namespace (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

362
Utility functions:
363

364
* Made chop() use relative rather than absolute tolerance for
365
  real/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

371
Miscellaneous 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
380
  instead 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--
386
Released February 5, 2010
387

388
General changes:
389

390
* Fully separated the code into "low-level" and "high-level", permitting the
391
  use of alternative contexts (the mpmath.mp object provides the default
392
  implementation)
393
* Implemented a context for fast double-precision arithmetic using Python
394
  types (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,
397
  gamma, digamma, ei, e1)
398
* Renamed and reorganized various internal modules and methods (including
399
  merging low-level modules into mpmath.libmp). This should not affect most
400
  external code using top-level imports.
401

402
Plotting:
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

407
Matrices:
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

413
Miscellaneous:
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
418
  differences
419
* Fixed several docstring typos (contributed by Chris Smith)
420
* Fixed a bug that prevented caching of quadrature nodes to work optimally.
421

422
Special functions:
423

424
* Implemented fast evaluation for large imaginary heights of the Riemann zeta
425
  function, 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
428
  algorithm
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
432
  de 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
436
  parameters
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,
444
  superfactorials, hyperfactorials, permitting large arguments in the left
445
  half-plane
446
* Implemented analytic continuation to |z| >= 1 for hypergeometric functions
447
  pFq 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
450
  repeated 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
454
  Python 2.6 cmath module
455
* Implemented spherical harmonics (spherharm())
456
* Optimized ci(), si(), chi(), shi() for complex arguments by evaluating
457
  them in terms of ei()
458
* Optimized hyp2f1 for z ~= -1
459

460
--0.13--
461
Released August 13, 2009
462

463
New 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

483
Evaluation of hypergeometric functions:
484

485
* Added the function hypercomb() for evaluating expressions containing
486
  hypergeometric series, with automatic handling of limits
487
* The available hypergeometric series (of orders up to and including 2F3)
488
  implement asymptotic expansions with respect to the last argument z, allowing
489
  fast and accurate evaluation anywhere in the complex plane. A massive number
490
  of functions, including Bessel functions, error functions, etc., have been
491
  updated to take advantage of this to support fast and accurate evaluation
492
  anywhere in the complex plane.
493
* Fixed hyp2f1 to handle z close to and on the unit circle (supporting
494
  evaluation anywhere in the complex plane)
495
* hyper() handles the 0F0 and 1F0 cases exactly
496
* hyper() eventually raises NoConvergence instead of getting stuck in
497
  an infinite loop if given a divergent or extremely slowly convergent series
498

499
Other improvements and bug fixes to special functions:
500

501
* gammainc is much faster for large arguments and avoids catastrophic
502
  cancellation
503
* Implemented specialized code for ei(x), e1(x), expint(n,x) and gammainc(n,x)
504
  for 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
511
  tests/torture.py
512

513
Other:
514
* Implemented the differint() function for fractional differentiaton / iterated
515
  integration
516
* Added functions fadd, fsub, fneg, fmul, fdiv for high-level arithmetic with
517
  controllable 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
521
  an integer power
522
* nthroot() renamed to root(); root() optionally computes any of
523
  the 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--
528
Released June 9, 2009
529

530
General
531
* It is now possible to create multiple context objects and use context-local
532
  methods instead of global state/functions (e.g. mp2=mp.clone(); mp2.dps=50;
533
  mp2.cos(3)). Not all functions have been converted to context methods, and
534
  there 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
536
  instead 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

540
Types 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
545
  by Vinzent Steinberg based on code by Don Peterson).
546
* Intervals supported by mpmathify() and nstr() (contributed by Vinzent
547
  Steinberg).
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

553
Calculus
554

555
* Fixed nsum() with Euler-Maclaurin summation which would previously
556
  ignore the starting index and sum from n=1.
557
* Implemented Newton's method for findroot() (contributed  by Vinzent
558
  Steinberg).
559

560
Linear 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
564
  function norm(x,p) and the generic matrix norm function mnorm(x,p).
565

566
Special functions:
567

568
* Some internal caches were changed to always slightly overallocate
569
  precision. This fixes worst-case behavior where previously the cached
570
  value 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
573
  wrong results at integer inputs being divisible by a large power of 2.
574
* Fixed asin() not to raise an exception at high precision (contributed
575
  by Vinzent Steinberg).
576
* Optimized the AGM code for the natural logarithm, making the previously
577
  used Newton method at intermediate precisions obsolete.
578
* The arithmetic-geometric mean function agm() is now an order of magnitude
579
  faster 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
583
  cuts (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()).
590
  and 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--
601
Released January 26, 2009
602

603
General:
604

605
* Most of the documentation is now generated from docstrings
606
  using Sphinx' autodoc feature, and proper LaTeX is used
607
  for mathematical formulas. A large amount of new documentation
608
  has been written.
609
* Improved gmpy backend. Using gmpy-1.04 gives a ~30% unit tests
610
  speedup over 1.03, with speedups in the range of 2-3x for
611
  specific operations (contributed by Case van Horsen and
612
  Mario Pernici).
613
* Mpmath imports slightly faster due to not trying to
614
  load the 'random' library
615

616
Numerical calculus, etc:
617

618
* Implemented a fast high-precision ODE solver (to replace the slow
619
  and 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
623
  as nsum()
624
* Multidimensional nonlinear solving with Newton's method
625
  implemented in findroot() (contributed by Vinzent Steinberg)
626
* Simplified the implementation and interface of sumem()
627
* Reimplemented Shanks transformation for nsum using Wynn's epsilon
628
  algorithm (shanks())
629
* Reimplemented Richardson extrapolation slightly more simply and
630
  efficiently (richardson())
631
* Prevent shanks() from exiting prematurely by adding
632
  random 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
638
  Mario Pernici)
639
* Better cancel condition for findroot() (contributed by
640
  Vinzent Steinberg)
641
* Some refactoring of numerical integration code
642
* Fix erroneous nodes for 0-th order Gauss-Legendre quadrature,
643
  which was causing unnecessary slowness
644
* Quadrature nodes are cached for arbitrary intervals, giving a
645
  30% speedup for repeated integrations
646
* Unified interface and added more options for identify(), pslq(), findpoly()
647

648
New 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
657
  function gammainc() for computing the generalized (and optionally
658
  regularized) 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
664
  rewritten from scratch, making them much faster and more
665
  general. Renamed Jacobi theta functions: jacobi_theta -> jtheta,
666
  etc. (contributed by Mario Pernici)
667
* Implemented derivatives of jtheta (djtheta) (contributed by
668
  Mario Pernici)
669
* Implemented Bessel Y, I, K functions (bessely, besseli,
670
  besselk; Bessel J functions were also renamed to besselj)
671
  also renamed)
672
* Generalized Stieltjes constants can now be computed,
673
  with stieltjes(n,a)
674
* Implemented Hankel functions (hankel1, hankel2)
675

676
Speed improvements and bugfixes to special functions:
677
* Fast logarithm at very high precision using the formula by
678
  Sasaki and Kanada (contributed by Mario Pernici)
679
* Slightly faster logarithm at low precision (contributed by
680
  Mario Pernici)
681
* Faster exponential function at high precision, using
682
  Newton'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
688
  formula
689
* Fixed bernoulli() being inaccurate for large n and low precision,
690
  and 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
695
  Mario 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,
702
  using an asymptotic expansion (contributed by Mario Pernici)
703
* Fixed accuracy bugs in theta functions (contributed by
704
  Mario Pernici)
705
* The Lambert W function returns more appropriate values at infinities
706

707
Arithmetic and basic interface:
708
* Square roots are now rounded correctly
709
* Made float(huge) -> inf and float(1/huge) -> 0 instead of
710
  raising OverflowError
711
* Renamed convert_lossless -> mpmathify
712
* mpmathify() accepts strings representing fractions or complex
713
  numbers (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
720
  sums, products and dot products of lists of mpf:s or mpc:s
721

722
Matrices:
723

724
* Generation of Hilbert matrices (hilbert()) (contributed by
725
  Vinzent Steinberg)
726
* Added lu_solve_mat() to solve a*x=b where a and b are matrices (contributed
727
  by Mario Pernici)
728
* Implemented computation of matrix exponentials (exp_pade()) (contributed
729
  by 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--
734
Released October 15, 2008
735

736
Interface / general:
737
* Mpmath now works with Python 2.6
738
* Implemented function plotting via 'plot' and 'cplot' (requires
739
  matplotlib)
740
* Removed global rounding mode (always rounding to nearest by default)
741
* Instead added 'prec', 'dps', 'rounding' keyword arguments to
742
  standard functions, for optional fine-grained control over precision
743
  and rounding
744
* Implemented isinf, isnan, isint, utility functions
745
* A large number of internal functions were moved and/or renamed to
746
  improve consistency. This particularly affects low-level mpf
747
  functions (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
750
  isolated 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
754
  installation problems more cleanly.)
755

756
Added 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

763
Improvements to interval arithmetic:
764
* Fixed rounding direction for negative numbers and related
765
  spurious 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
769
  accept interval arguments
770
* Intervals supported in matrices
771

772
Changes to root-finding code:
773
* secant renamed to findroot
774
* findroot was made more general; many useful alternative root-finding
775
  algorithms were implemented (contributed by Vinzent Steinberg)
776

777
Improvements 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
787
  von Staudt-Clausen theorem
788
* Using AGM to compute ellipk, which is much faster and works
789
  in 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

796
Improvements 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
801
  into subintervals
802
* Oscillatory quadrature uses Gauss-Legendre instead of tanh-sinh,
803
  since this is typically faster
804
* Fixed minor rounding bug in tanh-sinh quadrature not giving
805
  complete symmetry in the nodes
806
* Implemented quadrature rules in classes for improved extensibility
807

808
Various speed improvements:
809
* Up to 3x faster computation of log(x) at low precision, due to using
810
  Taylor series with argument reduction and partial caching
811
* About 2x faster log(x) at very high precision due to more efficient
812
  computation of exp in the Newton iteration
813
* Up to 10x faster computation of atan(x) at low to medium precision,
814
  due 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
820
  in pslq, findpoly and identify
821

822
Miscellaneous bugfixes:
823
* Fixed nthroot for n = -1, 0, 1
824
* Fixed inf/2**n and nan/2**n returning zero
825

826
--0.9--
827
Released August 23, 2008
828

829
* gmpy mpzs are used instead of python ints when available, for
830
  huge 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
837
  method (contributed by Mario Pernici)
838
* added Jacobi elliptic functions 1-4, sn, cn, dn (contributed by Mike
839
  Taschuk)
840
* polyval, polyroots and related functions now use the same order
841
  for coefficients as scipy and matlab (i.e. the reverse order of what
842
  was 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,
845
  arg, 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
851
  appropriate
852
* external classes can define a special method _mpmath_ to interact
853
  with mpmath numbers and functions
854
* fixed some corner cases in atan2
855
* faster rand()
856

857
--0.8--
858
Released April 20, 2008
859

860
New features:
861
* the full set of reciprocal trigonometric and hyperbolic functions
862
  and 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
871
  functions (elliptic integrals, orthogonal polynomials)
872
* several more mathematical constants
873
* fast sequential computation of integer logarithms and Bernoulli
874
  numbers
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

879
Bugfixes, speed enhancements, and other improvements:
880
* compatibility tests should now pass on systems where Python is
881
  compiled to use 80-bit registers for floating-point operations
882
* fixed mpmath to work with some versions of Python 2.4 where a
883
  list 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
886
  improved by Mario Pernici)
887
* multiplication and integer powers for complex numbers is faster
888
  and more accurate
889
* miscellaneous speed improvements to complex arithmetic (contributed
890
  by 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
894
  Mario Pernici)
895
* fixed computation of exp(n) for negative integers and x**y for
896
  negative 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.
901
  comparisons 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
904
  and libmpc modules for cleaner separation of functionality
905
* the rounding argument for lib and libmpc functions, and for
906
  some functions also the the prec argument, are now optional,
907
  resulting 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--
913
Released March 12, 2008
914

915
* the interface for switching precision and rounding modes has been
916
  changed. instead of changing mpf.prec, there is a new object mp
917
  which holds the precision as mp.prec. this change improves
918
  flexibility in the implementation. it will unfortunately break
919
  any existing code written for mpmath, but the broken code should
920
  be trivial to update.
921
* the functions workprec, workdps, extraprec, extradps have been
922
  introduced for switching precision in a more safe manner,
923
  ensuring that the precision gets reset when finished. they can
924
  be 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,
927
  since they added complexity without being particularly useful.
928
  round-half-even has been renamed to round-nearest.
929
* implemented the functions nstr, nprint for printing numbers with
930
  a small or custom number of digits
931
* accuracy of cos and sin near roots has been fixed. computing
932
  sin(x) or cos(x) where x is huge is also much faster
933
* implemented a magical constant eps that gives the "machine"
934
  epsilon
935
* additional mathematical functions: implemented Catalan's constant
936
  and 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
944
  packages
945
* external classes can interoperate with mpf and mpc instances
946
  by defining _mpf_ or _mpc_ properties
947
* renamed lib.fpow -> lib.fpowi and implemented lib.fpow for general
948
  real powers. <mpf> ** <mpf> should now be slightly faster and more
949
  robust
950
* the internal number representation has been changed to include
951
  an explicit sign bit. as a result of this change and other small
952
  tweaks, arithmetic is up to 20% faster and the total running
953
  time 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
958
    Pernici)
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--
963
Released January 13, 2008
964

965
* added the mpi type for interval arithmetic
966
* powers with integer exponents are computed with directed rounding
967
  all 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
972
  considerable simplification of the mpf class implementation
973
* partial support for infs and nans in functions, e.g.
974
  exp(inf) -> inf and exp(-inf) -> 0 now work.
975
* renamed several files. created mpmath.apps and moved tests into
976
  the 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
979
  small performance tweaks, resulting in a 20-30% speedup for
980
  arithmetic
981

982
--0.5--
983
Released 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
991
  from_int_exact, etc)
992
* renamed cgamma to euler
993
* more documentation strings
994

995
--0.4--
996
Released 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
1002
  in 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
1007
  automatically generate timings with psyco both disabled and enabled
1008
* rewrote unit tests to use py.test
1009

1010
--0.3--
1011
Released 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
1017
  accuracy 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 --
1025
Released 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 --
1041
Released 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

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.