mpmath 1.5.0a1__tar.gz → 1.5.0a2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.github/CONTRIBUTING.rst +1 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.github/workflows/linter.yml +2 -4
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.github/workflows/test.yml +8 -1
- mpmath-1.5.0a2/.pre-commit-config.yaml +22 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/CHANGES +19 -2
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/PKG-INFO +9 -8
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/README.rst +4 -3
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/conftest.py +0 -9
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/basics.rst +53 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/fft.rst +1 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/sums_limits.rst +0 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/contexts.rst +2 -2
- mpmath-1.5.0a2/docs/functions/abelian.rst +39 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/index.rst +1 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/identification.rst +10 -0
- mpmath-1.5.0a2/docs/plots/rtheta.png +0 -0
- mpmath-1.5.0a2/docs/plots/rtheta.py +12 -0
- mpmath-1.5.0a2/docs/plots/rtheta_surface.png +0 -0
- mpmath-1.5.0a2/docs/plots/rtheta_surface.py +9 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plotting.rst +0 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/setup.rst +1 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/technical.rst +1 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/__init__.py +3 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/__main__.py +3 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/_version.py +3 -3
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/fft.py +65 -14
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/ctx_fp.py +1 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/ctx_iv.py +1 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/ctx_mp.py +1 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/function_docs.py +13 -24
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/__init__.py +1 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/elliptic.py +235 -134
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/functions.py +74 -31
- mpmath-1.5.0a2/mpmath/functions/riemann_theta.py +1119 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/identification.py +261 -3
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libmp/gammazeta.py +4 -2
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libmp/libelefun.py +7 -7
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libmp/libintmath.py +6 -2
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libmp/libmpc.py +36 -31
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libmp/libmpf.py +73 -28
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libmp/libmpi.py +3 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_calculus.py +20 -7
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_cli.py +4 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_convert.py +29 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_demos.py +6 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_elliptic.py +65 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_format.py +6 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_fp.py +1 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_functions.py +737 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_interval.py +45 -0
- mpmath-1.5.0a2/mpmath/tests/test_lattice.py +358 -0
- mpmath-1.5.0a2/mpmath/tests/test_riemann_theta.py +439 -0
- mpmath-1.5.0a2/mpmath/tests/test_riemann_theta_derivatives.py +401 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_trig.py +14 -1
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath.egg-info/PKG-INFO +9 -8
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath.egg-info/SOURCES.txt +10 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath.egg-info/requires.txt +4 -3
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath.egg-info/scm_file_list.json +10 -0
- mpmath-1.5.0a2/mpmath.egg-info/scm_version.json +8 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/pyproject.toml +14 -10
- mpmath-1.5.0a1/mpmath.egg-info/scm_version.json +0 -8
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.codecov.yml +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.gitattributes +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.github/dependabot.yml +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.github/workflows/coverage.yml +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.github/workflows/docs.yml +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.github/workflows/publish.yml +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.gitignore +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/.readthedocs.yaml +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/CITATION.bib +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/LICENSE +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/demo/mandelbrot.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/demo/manydigits.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/demo/pidigits.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/demo/plotting.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/demo/sofa.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/demo/taylor.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/approximation.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/differentiation.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/index.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/integration.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/inverselaplace.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/odes.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/optimization.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/calculus/polynomials.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/cli.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/conf.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/bessel.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/constants.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/elliptic.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/expintegrals.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/gamma.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/hyperbolic.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/hypergeometric.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/numtheory.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/orthogonal.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/powers.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/qfunctions.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/signals.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/trigonometric.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/functions/zeta.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/general.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/genindex.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/index.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/matrices.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ai.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ai.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ai_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ai_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ber.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ber.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besseli.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besseli.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besseli_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besseli_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besselj.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besselj.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besselj_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besselj_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besselk.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besselk.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besselk_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/besselk_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/bessely.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/bessely.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/bessely_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/bessely_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/bi.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/bi.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/bi_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/bi_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/buildplots.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/chebyt.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/chebyt.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/chebyu.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/chebyu.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/coulombf.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/coulombf.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/coulombf_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/coulombf_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/coulombg.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/coulombg.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/coulombg_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/coulombg_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ellipe.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ellipe.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ellipf.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ellipf.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ellipk.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ellipk.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ellippi.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ellippi.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/gi.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/gi.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/gi_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/gi_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hankel1.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hankel1.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hankel1_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hankel1_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hankel2.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hankel2.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hankel2_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hankel2_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hermite.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hermite.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hi.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hi.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hi_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/hi_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ker.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/ker.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/kleinj.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/kleinj.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/kleinj2.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/kleinj2.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/laguerre.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/laguerre.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/lambertw.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/lambertw.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/lambertw_c.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/lambertw_c.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/legendre.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/legendre.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/lommels1.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/lommels1.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/lommels2.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/lommels2.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/pcfd.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/pcfd.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm40.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm40.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm41.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm41.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm42.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm42.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm43.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm43.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm44.png +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/plots/spherharm44.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/docs/references.rst +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/_interactive.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/__init__.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/approximation.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/calculus.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/differentiation.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/extrapolation.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/inverselaplace.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/odes.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/optimization.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/polynomials.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/calculus/quadrature.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/ctx_base.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/ctx_mp_python.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/bessel.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/expintegrals.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/factorials.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/hypergeometric.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/orthogonal.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/qfunctions.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/rszeta.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/signals.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/theta.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/zeta.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/functions/zetazeros.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libfp.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libmp/__init__.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libmp/backend.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/libmp/libhyper.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/matrices/__init__.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/matrices/calculus.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/matrices/eigen.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/matrices/eigen_symmetric.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/matrices/linalg.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/matrices/matrices.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_basic_ops.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_bitwise.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_compatibility.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_diff.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_division.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_eigen.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_eigen_symmetric.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_extra_gamma.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_extra_zeta.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_functions2.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_gammazeta.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_hp.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_identify.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_levin.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_linalg.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_matrices.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_module.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_mpmath.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_ode.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_pickle.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_power.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_quad.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_rootfinding.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_special.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_str.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_summation.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_torture.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_version_frozen.sh +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/tests/test_visualization.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/usertools.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath/visualization.py +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath.egg-info/dependency_links.txt +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath.egg-info/top_level.txt +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/mpmath.egg-info/zip-safe +0 -0
- {mpmath-1.5.0a1 → mpmath-1.5.0a2}/setup.cfg +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name: Linting with
|
|
1
|
+
name: Linting with ruff, etc
|
|
2
2
|
on: [workflow_dispatch, workflow_call]
|
|
3
3
|
jobs:
|
|
4
4
|
linter:
|
|
@@ -10,6 +10,4 @@ jobs:
|
|
|
10
10
|
- uses: actions/setup-python@v7
|
|
11
11
|
with:
|
|
12
12
|
python-version: "3.x"
|
|
13
|
-
-
|
|
14
|
-
- run: python -We:invalid -m compileall -f mpmath -q
|
|
15
|
-
- run: flake518 mpmath
|
|
13
|
+
- uses: j178/prek-action@v3.0.0
|
|
@@ -45,20 +45,27 @@ jobs:
|
|
|
45
45
|
purepy: true
|
|
46
46
|
- python-version: pypy3.11
|
|
47
47
|
purepy: true
|
|
48
|
+
- python-version: graalpy-25
|
|
49
|
+
purepy: true
|
|
50
|
+
- python-version: pypy3.11
|
|
51
|
+
nogmpy: true
|
|
48
52
|
env:
|
|
49
53
|
PYTEST_ADDOPTS: -n auto --durations=20
|
|
50
54
|
steps:
|
|
51
55
|
- uses: actions/checkout@v7
|
|
52
56
|
with:
|
|
53
57
|
fetch-depth: 0
|
|
58
|
+
- run: sudo apt-get update
|
|
59
|
+
- run: sudo apt-get install zlib1g-dev libjpeg8-dev
|
|
54
60
|
- name: Set up Python ${{ matrix.python-version }}
|
|
55
61
|
uses: actions/setup-python@v7
|
|
56
62
|
with:
|
|
57
63
|
python-version: ${{ matrix.python-version }}
|
|
58
64
|
allow-prereleases: true
|
|
65
|
+
check-latest: true
|
|
66
|
+
- run: pip install --upgrade setuptools pip
|
|
59
67
|
- name: Install dependencies
|
|
60
68
|
run: |
|
|
61
|
-
pip install --upgrade setuptools pip
|
|
62
69
|
pip install --upgrade .[develop,gmpy2,gmp,ci]
|
|
63
70
|
- run: pip uninstall -y gmpy2
|
|
64
71
|
if: matrix.nogmpy
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-yaml
|
|
6
|
+
- id: check-toml
|
|
7
|
+
- id: end-of-file-fixer
|
|
8
|
+
- id: trailing-whitespace
|
|
9
|
+
- id: name-tests-test
|
|
10
|
+
args: [--pytest-test-first]
|
|
11
|
+
exclude: ^tests/utils.py$
|
|
12
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
13
|
+
rev: v0.8.3
|
|
14
|
+
hooks:
|
|
15
|
+
- id: ruff
|
|
16
|
+
name: Run ruff
|
|
17
|
+
args: [--exit-non-zero-on-fix]
|
|
18
|
+
- repo: https://github.com/sphinx-contrib/sphinx-lint
|
|
19
|
+
rev: v1.0.0
|
|
20
|
+
hooks:
|
|
21
|
+
- id: sphinx-lint
|
|
22
|
+
name: Run sphinx-lint
|
|
@@ -18,7 +18,11 @@ Features:
|
|
|
18
18
|
see #1153 (Sergey B Kirpichev)
|
|
19
19
|
* Add shortest_str context option to enable using shortest decimal
|
|
20
20
|
representations in str/repr/format output, see #1115 (Sergey B Kirpichev)
|
|
21
|
-
* Add fft()/invfft() functions for DFT calculation, see #1152
|
|
21
|
+
* Add fft()/invfft() functions for DFT calculation, see #1152 and
|
|
22
|
+
#1176 (Ayush Baranwal)
|
|
23
|
+
* Add lll_gram() for LLL reduction, see #1185 (Graham Hesketh)
|
|
24
|
+
* Add Riemann theta functions, rtheta() and rtheta_jet(), see #1182
|
|
25
|
+
(Graham Hesketh)
|
|
22
26
|
|
|
23
27
|
Compatibility:
|
|
24
28
|
|
|
@@ -94,6 +98,17 @@ Bug fixes:
|
|
|
94
98
|
* Avoid spurious overflow in fp gammaprod, see #1150 (Sanjay Santhanam)
|
|
95
99
|
* Document pretty_dps context's option, see #1153 (Sergey B Kirpichev)
|
|
96
100
|
* Fix cplot points rounding, see #1155 (alexfyp)
|
|
101
|
+
* Fix special cases for log1p, atan2, sin, cos, sqrt, hypot, atan,
|
|
102
|
+
atanh, see #1178, #1179, #1191, #1192 (Matt Haberland)
|
|
103
|
+
* Speedup bin_to_radix for power-of-two bases, see #1187 (Sai Adith Prakash)
|
|
104
|
+
* Fix complex interval conjugation, see #1202 (Christopher Albert)
|
|
105
|
+
* Flip rounding direction when negating in mpf_gamma(type=3),
|
|
106
|
+
see #1204 (Syed Ahnaf Raza)
|
|
107
|
+
* Use extra working precision in mpf_atan2 for directed rounding
|
|
108
|
+
and fix mpi_atan2() for y == 0 with x spanning zero, see #1203
|
|
109
|
+
(Syed Ahnaf Raza)
|
|
110
|
+
* Accept spelled-out infinity in from_str(), see #1208 (Rahul)
|
|
111
|
+
* Add missing degree constant to the FPContext, see #1207 (Rahul)
|
|
97
112
|
|
|
98
113
|
Maintenance:
|
|
99
114
|
|
|
@@ -105,6 +120,8 @@ Maintenance:
|
|
|
105
120
|
* Fix test_sn_cn_dn_identities(), see #1106 (Sergey B Kirpichev)
|
|
106
121
|
* Fix test_compatibility(): avoid using of private numpy
|
|
107
122
|
API (Sergey B Kirpichev)
|
|
123
|
+
* Use prek, see #1184 (Sergey B Kirpichev)
|
|
124
|
+
* Use new version of python-gmp in CI, see #1197 (Sergey B Kirpichev)
|
|
108
125
|
|
|
109
126
|
|
|
110
127
|
--1.4.1--
|
|
@@ -723,7 +740,7 @@ General changes:
|
|
|
723
740
|
use of alternative contexts (the mpmath.mp object provides the default
|
|
724
741
|
implementation)
|
|
725
742
|
* Implemented a context for fast double-precision arithmetic using Python
|
|
726
|
-
types (mpmath.fp)
|
|
743
|
+
types (mpmath.fp)
|
|
727
744
|
* Implemented hooks for importing a faster version of mp arithmetic from Sage
|
|
728
745
|
* Implemented optimized fp versions of certain functions (including erf, erfc,
|
|
729
746
|
gamma, digamma, ei, e1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mpmath
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.0a2
|
|
4
4
|
Summary: Python library for arbitrary-precision floating-point arithmetic
|
|
5
5
|
Author-email: Fredrik Johansson <fredrik.johansson@gmail.com>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -22,26 +22,26 @@ Classifier: Programming Language :: Python :: 3.15
|
|
|
22
22
|
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
|
|
23
23
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
24
24
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
25
|
+
Classifier: Programming Language :: Python :: Implementation :: GraalPy
|
|
25
26
|
Requires-Python: >=3.10
|
|
26
27
|
Description-Content-Type: text/x-rst
|
|
27
28
|
License-File: LICENSE
|
|
28
29
|
Provides-Extra: tests
|
|
29
30
|
Requires-Dist: pytest>=6; extra == "tests"
|
|
30
|
-
Requires-Dist: numpy;
|
|
31
|
+
Requires-Dist: numpy; extra == "tests"
|
|
31
32
|
Requires-Dist: packaging; extra == "tests"
|
|
32
33
|
Requires-Dist: pytest-timeout; extra == "tests"
|
|
33
|
-
Requires-Dist: matplotlib;
|
|
34
|
+
Requires-Dist: matplotlib; platform_python_implementation != "GraalVM" and extra == "tests"
|
|
34
35
|
Requires-Dist: pexpect; extra == "tests"
|
|
35
36
|
Requires-Dist: ipython; extra == "tests"
|
|
36
37
|
Requires-Dist: hypothesis; extra == "tests"
|
|
37
38
|
Provides-Extra: develop
|
|
38
39
|
Requires-Dist: mpmath[tests]; extra == "develop"
|
|
39
|
-
Requires-Dist: flake518>=1.5; extra == "develop"
|
|
40
40
|
Requires-Dist: pytest-cov>=7; extra == "develop"
|
|
41
41
|
Requires-Dist: wheel; extra == "develop"
|
|
42
42
|
Requires-Dist: build; extra == "develop"
|
|
43
43
|
Provides-Extra: gmpy2
|
|
44
|
-
Requires-Dist: gmpy2>=2.3; extra == "gmpy2"
|
|
44
|
+
Requires-Dist: gmpy2>=2.3; platform_python_implementation != "GraalVM" and extra == "gmpy2"
|
|
45
45
|
Provides-Extra: gmpy
|
|
46
46
|
Requires-Dist: mpmath[gmpy2]; extra == "gmpy"
|
|
47
47
|
Provides-Extra: gmp
|
|
@@ -106,6 +106,7 @@ or new features to mpmath:
|
|
|
106
106
|
* Nike Dattani <nike@hpqc.org>
|
|
107
107
|
* Tim Peters <tim.peters@gmail.com>
|
|
108
108
|
* Javier Garcia <javier.garcia.tw@hotmail.com>
|
|
109
|
+
* Graham Hesketh <gdh1e10@gmail.com>
|
|
109
110
|
|
|
110
111
|
Numerous other people have contributed by reporting bugs,
|
|
111
112
|
requesting new features, or suggesting improvements to the
|
|
@@ -130,8 +131,8 @@ Credit also goes to:
|
|
|
130
131
|
* The authors of the GMP library and the Python wrapper
|
|
131
132
|
gmpy, enabling mpmath to become much faster at
|
|
132
133
|
high precision
|
|
133
|
-
* The authors of MPFR, pari/gp, MPFUN, and other arbitrary-
|
|
134
|
-
|
|
134
|
+
* The authors of MPFR, pari/gp, MPFUN, and other arbitrary-precision
|
|
135
|
+
libraries, whose documentation has been helpful
|
|
135
136
|
for implementing many of the algorithms in mpmath
|
|
136
137
|
* Wikipedia contributors; Abramowitz & Stegun; Gradshteyn & Ryzhik;
|
|
137
138
|
Wolfram Research for MathWorld and the Wolfram Functions site.
|
|
@@ -173,7 +174,7 @@ Release history:
|
|
|
173
174
|
--------------------------
|
|
174
175
|
|
|
175
176
|
Mpmath requires Python 3.10 or later versions. It has been tested with CPython
|
|
176
|
-
3.10 through 3.15 and
|
|
177
|
+
3.10 through 3.15, with PyPy 7.3.23 and with GraalPy 25.3.
|
|
177
178
|
|
|
178
179
|
The latest release of mpmath can be downloaded from the mpmath
|
|
179
180
|
website and from https://github.com/mpmath/mpmath/releases
|
|
@@ -49,6 +49,7 @@ or new features to mpmath:
|
|
|
49
49
|
* Nike Dattani <nike@hpqc.org>
|
|
50
50
|
* Tim Peters <tim.peters@gmail.com>
|
|
51
51
|
* Javier Garcia <javier.garcia.tw@hotmail.com>
|
|
52
|
+
* Graham Hesketh <gdh1e10@gmail.com>
|
|
52
53
|
|
|
53
54
|
Numerous other people have contributed by reporting bugs,
|
|
54
55
|
requesting new features, or suggesting improvements to the
|
|
@@ -73,8 +74,8 @@ Credit also goes to:
|
|
|
73
74
|
* The authors of the GMP library and the Python wrapper
|
|
74
75
|
gmpy, enabling mpmath to become much faster at
|
|
75
76
|
high precision
|
|
76
|
-
* The authors of MPFR, pari/gp, MPFUN, and other arbitrary-
|
|
77
|
-
|
|
77
|
+
* The authors of MPFR, pari/gp, MPFUN, and other arbitrary-precision
|
|
78
|
+
libraries, whose documentation has been helpful
|
|
78
79
|
for implementing many of the algorithms in mpmath
|
|
79
80
|
* Wikipedia contributors; Abramowitz & Stegun; Gradshteyn & Ryzhik;
|
|
80
81
|
Wolfram Research for MathWorld and the Wolfram Functions site.
|
|
@@ -116,7 +117,7 @@ Release history:
|
|
|
116
117
|
--------------------------
|
|
117
118
|
|
|
118
119
|
Mpmath requires Python 3.10 or later versions. It has been tested with CPython
|
|
119
|
-
3.10 through 3.15 and
|
|
120
|
+
3.10 through 3.15, with PyPy 7.3.23 and with GraalPy 25.3.
|
|
120
121
|
|
|
121
122
|
The latest release of mpmath can be downloaded from the mpmath
|
|
122
123
|
website and from https://github.com/mpmath/mpmath/releases
|
|
@@ -15,15 +15,6 @@ def pytest_report_header(config):
|
|
|
15
15
|
def pytest_configure(config):
|
|
16
16
|
config.addinivalue_line('markers', 'slow: marks tests as slow')
|
|
17
17
|
|
|
18
|
-
if "no:hypothesispytest" not in config.getoption("-p"):
|
|
19
|
-
from hypothesis import settings
|
|
20
|
-
|
|
21
|
-
default = settings.get_profile("default")
|
|
22
|
-
settings.register_profile("default",
|
|
23
|
-
settings(default, max_examples=1000))
|
|
24
|
-
ci = settings.get_profile("ci")
|
|
25
|
-
settings.register_profile("ci", settings(ci, max_examples=10000))
|
|
26
|
-
|
|
27
18
|
|
|
28
19
|
@pytest.fixture(autouse=True)
|
|
29
20
|
def reset_mp_globals():
|
|
@@ -209,6 +209,20 @@ Note that when creating a new ``mpf``, the value will at most be as accurate as
|
|
|
209
209
|
|
|
210
210
|
(Binary fractions such as 0.5, 1.5, 0.75, 0.125, etc, are generally safe as input, however, since those can be represented exactly by Python floats.)
|
|
211
211
|
|
|
212
|
+
You always can use hexadecimal or binary strings of didits to specify exact
|
|
213
|
+
value unambiguously:
|
|
214
|
+
|
|
215
|
+
>>> mpf("0x1.5544cb90d4f68p-2")
|
|
216
|
+
mpf('0.33327024528011018')
|
|
217
|
+
>>> mpf("1.5544cb90d4f68p-2", base=16)
|
|
218
|
+
mpf('0.33327024528011018')
|
|
219
|
+
>>> f"{_:a}"
|
|
220
|
+
'0x1.5544cb90d4f68p-2'
|
|
221
|
+
>>> mpf("0b1.0101010101000100110010111001000011010100111101101p-2")
|
|
222
|
+
mpf('0.33327024528011018')
|
|
223
|
+
>>> f"{_:b}"
|
|
224
|
+
'1.0101010101000100110010111001000011010100111101101p-2'
|
|
225
|
+
|
|
212
226
|
Printing
|
|
213
227
|
--------
|
|
214
228
|
|
|
@@ -281,3 +295,42 @@ changing the working precision, use :func:`format syntax support
|
|
|
281
295
|
'0.16666667'
|
|
282
296
|
>>> f'{a:.50}'
|
|
283
297
|
'0.16666666666666665741480812812369549646973609924316'
|
|
298
|
+
|
|
299
|
+
Use mpmath CLI
|
|
300
|
+
--------------
|
|
301
|
+
|
|
302
|
+
It's possible to :ref:`run the mpmath as a module <cli>` (``python -m
|
|
303
|
+
mpmath``). This provides access to the Python (or IPython) shell, where all
|
|
304
|
+
public mpmath interfaces are imported. Also, per default, floating-point
|
|
305
|
+
literals (decimal, binary or hexadecimal) are parsed as ``mpf``/``mpc`` and
|
|
306
|
+
``str()``-style output for ``repr()`` is enabled. Here is an example of
|
|
307
|
+
IPython-powered shell session:
|
|
308
|
+
|
|
309
|
+
.. code:: text
|
|
310
|
+
|
|
311
|
+
In [1]: 0b1.1011p-2 # binary input
|
|
312
|
+
Out[1]: 0.421875
|
|
313
|
+
|
|
314
|
+
In [2]: gamma(_)
|
|
315
|
+
Out[2]: 2.1008334194214666
|
|
316
|
+
|
|
317
|
+
In [3]: sin(1)
|
|
318
|
+
Out[3]: 0.8414709848078965
|
|
319
|
+
|
|
320
|
+
In [4]: type(_)
|
|
321
|
+
Out[4]: mpmath.ctx_mp_python.mpf
|
|
322
|
+
|
|
323
|
+
In [5]: acos(0x1.bp13) # hexadecimal input
|
|
324
|
+
Out[5]: (0.0 + 10.227308670295587j)
|
|
325
|
+
|
|
326
|
+
In [6]: type(_)
|
|
327
|
+
Out[6]: mpmath.ctx_mp_python.mpc
|
|
328
|
+
|
|
329
|
+
In [7]: 0.8414709848078965j # decimal input
|
|
330
|
+
Out[7]: (0.0 + 0.8414709848078965j)
|
|
331
|
+
|
|
332
|
+
In [8]: _7.imag == _3
|
|
333
|
+
Out[8]: True
|
|
334
|
+
|
|
335
|
+
In [9]: type(_7)
|
|
336
|
+
Out[9]: mpmath.ctx_mp_python.mpf
|
|
@@ -334,7 +334,7 @@ Due to intermediate rounding and cancellation errors, results computed with ``fp
|
|
|
334
334
|
|
|
335
335
|
Beware that the ``fp`` context has signed zero, that can be used to distinguish
|
|
336
336
|
different sides of branch cuts. For example, ``fp.mpc(-1, -0.0)`` is treated
|
|
337
|
-
as though it lies *below* the branch cut for :func:`~mpmath.sqrt
|
|
337
|
+
as though it lies *below* the branch cut for :func:`~mpmath.sqrt`::
|
|
338
338
|
|
|
339
339
|
>>> fp.sqrt(fp.mpc(-1, -0.0))
|
|
340
340
|
-1j
|
|
@@ -366,5 +366,5 @@ one has no signed zeros and allows to specify result *on the branch cut*
|
|
|
366
366
|
>>> fp.mpc(mp.sqrt(-1))
|
|
367
367
|
1j
|
|
368
368
|
|
|
369
|
-
Here it's continuous from the above of the :func:`~mpmath.sqrt
|
|
369
|
+
Here it's continuous from the above of the :func:`~mpmath.sqrt` branch
|
|
370
370
|
cut (from ``0`` along the negative real axis to the negative infinity).
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Abelian functions
|
|
2
|
+
-----------------
|
|
3
|
+
|
|
4
|
+
Riemann theta functions generalize the Jacobi theta functions from one
|
|
5
|
+
complex variable to several. They arose in Riemann's nineteenth-century
|
|
6
|
+
theory of Abelian functions and compact Riemann surfaces. Today they are
|
|
7
|
+
fundamental tools in complex analysis and algebraic geometry, and occur in
|
|
8
|
+
finite-gap and quasiperiodic solutions of integrable systems.
|
|
9
|
+
|
|
10
|
+
In genus :math:`g`, the argument :math:`\mathbf{z}\in\mathbb C^g` is a
|
|
11
|
+
column vector and the period matrix
|
|
12
|
+
:math:`\boldsymbol{\tau}\in\mathbb C^{g\times g}` is symmetric with
|
|
13
|
+
positive-definite imaginary part.
|
|
14
|
+
|
|
15
|
+
Theta functions are quasiperiodic. For integer vectors
|
|
16
|
+
:math:`\mathbf{m},\mathbf{n}\in\mathbb Z^g`, the zero-characteristic function
|
|
17
|
+
satisfies
|
|
18
|
+
|
|
19
|
+
.. math ::
|
|
20
|
+
|
|
21
|
+
\theta(\mathbf{z}+\mathbf{m}+\boldsymbol{\tau}\,\mathbf{n}
|
|
22
|
+
\mid\boldsymbol{\tau})
|
|
23
|
+
= \exp\!\left(-\pi i\,\mathbf{n}^{T}\boldsymbol{\tau}\,\mathbf{n}
|
|
24
|
+
-2\pi i\,\mathbf{n}^{T}\mathbf{z}\right)
|
|
25
|
+
\theta(\mathbf{z}\mid\boldsymbol{\tau}).
|
|
26
|
+
|
|
27
|
+
Although theta functions are quasiperiodic, suitable ratios and combinations
|
|
28
|
+
of them give multiply-periodic Abelian functions. In genus two, such Abelian
|
|
29
|
+
functions are meromorphic functions of two complex variables with a period
|
|
30
|
+
lattice of rank four, generated in normalized coordinates by the columns of
|
|
31
|
+
:math:`\mathbf{I}_2` and :math:`\boldsymbol{\tau}`.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
Riemann theta functions
|
|
35
|
+
.......................
|
|
36
|
+
|
|
37
|
+
.. autofunction:: mpmath.rtheta
|
|
38
|
+
|
|
39
|
+
.. autofunction:: mpmath.rtheta_jet
|
|
@@ -9,6 +9,11 @@ Automated number recognition based on PSLQ is not a silver bullet. Any occurring
|
|
|
9
9
|
|
|
10
10
|
The number identification facilities in mpmath are inspired by the `Inverse Symbolic Calculator <http://wayback.cecm.sfu.ca/projects/ISC/ISCmain.html>`_ (ISC). The ISC is more powerful than mpmath, as it uses a lookup table of millions of precomputed constants (thereby mitigating the problem with exponential complexity).
|
|
11
11
|
|
|
12
|
+
LLL lattice reduction is also documented below. A basis generates a lattice
|
|
13
|
+
from all its integer linear combinations; ``lll_gram`` reduces that basis
|
|
14
|
+
using its Gram matrix, without requiring the basis vectors themselves. The
|
|
15
|
+
reduced basis can reveal integer relations, as the example below illustrates.
|
|
16
|
+
|
|
12
17
|
Constant recognition
|
|
13
18
|
-----------------------------------
|
|
14
19
|
|
|
@@ -29,3 +34,8 @@ Integer relations (PSLQ)
|
|
|
29
34
|
:func:`~mpmath.pslq`
|
|
30
35
|
^^^^^^^^^^^^^^^^^^^^^
|
|
31
36
|
.. autofunction:: mpmath.pslq
|
|
37
|
+
|
|
38
|
+
Lattice reduction (LLL)
|
|
39
|
+
-----------------------
|
|
40
|
+
|
|
41
|
+
.. autofunction:: mpmath.lll_gram
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import matplotlib.pyplot as plt
|
|
2
|
+
from mpmath import j, plot, re, rtheta
|
|
3
|
+
|
|
4
|
+
tau = [[j, -0.5], [-0.5, j]]
|
|
5
|
+
curves = [
|
|
6
|
+
lambda x: re(rtheta([x, x/2], tau)),
|
|
7
|
+
lambda x: re(rtheta([x, 2*x], tau)),
|
|
8
|
+
]
|
|
9
|
+
fig, ax = plt.subplots()
|
|
10
|
+
plot(curves, [-2, 2], axes=ax)
|
|
11
|
+
ax.legend([r"$z=(x,x/2)$", r"$z=(x,2x)$"])
|
|
12
|
+
fig.savefig("rtheta.png")
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import matplotlib.pyplot as plt
|
|
2
|
+
from mpmath import j, rtheta, splot
|
|
3
|
+
|
|
4
|
+
tau = [[j, 0.5], [0.5, j]]
|
|
5
|
+
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
|
|
6
|
+
surface = lambda x, y: abs(rtheta([x, y], tau))
|
|
7
|
+
splot(surface, [-1, 1], [-1, 1], points=35, keep_aspect=False, axes=ax, plot3d_kwargs={"cmap": "viridis"})
|
|
8
|
+
ax.set_zlabel(r"$|\theta(z\mid\tau)|$")
|
|
9
|
+
fig.savefig("rtheta_surface.png")
|
|
@@ -145,7 +145,7 @@ In Sage, mpmath can alternatively be imported via the interface library
|
|
|
145
145
|
sage: import sage.libs.mpmath.all as mpmath
|
|
146
146
|
|
|
147
147
|
This module provides a few extra conversion functions, including ``mpmath.call()``
|
|
148
|
-
which permits calling any mpmath function with Sage numbers as input, and getting
|
|
148
|
+
which permits calling any mpmath function with Sage numbers as input, and getting
|
|
149
149
|
Sage ``RealNumber`` or ``ComplexNumber`` instances
|
|
150
150
|
with the appropriate precision back::
|
|
151
151
|
|
|
@@ -22,7 +22,7 @@ The following terms are common in this documentation:
|
|
|
22
22
|
- *Accuracy* is the inverse of error.
|
|
23
23
|
- *Tolerance* is the maximum error (or minimum accuracy) desired in a result.
|
|
24
24
|
|
|
25
|
-
Error and accuracy can be measured either directly, or logarithmically in bits or digits. Specifically, if a `\hat y` is an approximation for `y`, then
|
|
25
|
+
Error and accuracy can be measured either directly, or logarithmically in bits or digits. Specifically, if a `\hat y` is an approximation for `y`, then
|
|
26
26
|
|
|
27
27
|
- (Direct) absolute error = `|\hat y - y|`
|
|
28
28
|
- (Direct) relative error = `|\hat y - y| |y|^{-1}`
|
|
@@ -47,6 +47,8 @@ g2g3from = mp.g2g3from
|
|
|
47
47
|
omega1omega2from = mp.omega1omega2from
|
|
48
48
|
ellipfun = mp.ellipfun
|
|
49
49
|
jtheta = mp.jtheta
|
|
50
|
+
rtheta = mp.rtheta
|
|
51
|
+
rtheta_jet = mp.rtheta_jet
|
|
50
52
|
kleinj = mp.kleinj
|
|
51
53
|
kleinjinv = mp.kleinjinv
|
|
52
54
|
eta = mp.eta
|
|
@@ -169,6 +171,7 @@ residual = mp.residual
|
|
|
169
171
|
qr_solve = mp.qr_solve
|
|
170
172
|
cholesky = mp.cholesky
|
|
171
173
|
cholesky_solve = mp.cholesky_solve
|
|
174
|
+
lll_gram = mp.lll_gram
|
|
172
175
|
det = mp.det
|
|
173
176
|
cond = mp.cond
|
|
174
177
|
hessenberg = mp.hessenberg
|
|
@@ -71,6 +71,8 @@ def main():
|
|
|
71
71
|
|
|
72
72
|
try:
|
|
73
73
|
import IPython
|
|
74
|
+
import IPython.terminal
|
|
75
|
+
import IPython.terminal.ipapp
|
|
74
76
|
import traitlets
|
|
75
77
|
except ImportError:
|
|
76
78
|
args.no_ipython = True
|
|
@@ -94,7 +96,7 @@ def main():
|
|
|
94
96
|
source = """
|
|
95
97
|
from mpmath._interactive import wrap_float_literals, wrap_hexbinfloats
|
|
96
98
|
ip = get_ipython()
|
|
97
|
-
ip.input_transformers_post.append(
|
|
99
|
+
ip.input_transformers_post.append(wrap_hexbinfloats)
|
|
98
100
|
ip.input_transformers_post.append(wrap_float_literals)
|
|
99
101
|
del ip
|
|
100
102
|
"""
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.5.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 5, 0, '
|
|
21
|
+
__version__ = version = '1.5.0a2'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 5, 0, 'a2')
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gc4c7a6494'
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
from .calculus import defun
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
def _is_power_of_two(n):
|
|
5
|
+
return (n & (n - 1)) == 0
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _next_power_of_two(n):
|
|
9
|
+
return 1 << (n - 1).bit_length()
|
|
10
|
+
|
|
11
|
+
|
|
3
12
|
def _fft_cooley_tuckey(ctx, values, inverse=False):
|
|
4
13
|
"""
|
|
5
14
|
This function implements the Radix-2 Cooley-Tukey FFT algorithm iteratively.
|
|
@@ -46,12 +55,52 @@ def _fft_cooley_tuckey(ctx, values, inverse=False):
|
|
|
46
55
|
|
|
47
56
|
return transformed
|
|
48
57
|
|
|
58
|
+
|
|
59
|
+
def _fft_convolve(ctx, values_a, values_b):
|
|
60
|
+
"""
|
|
61
|
+
Computes the convolution of two sequences using the Fast Fourier Transform (FFT).
|
|
62
|
+
"""
|
|
63
|
+
size = _next_power_of_two(len(values_a) + len(values_b) - 1)
|
|
64
|
+
padded_a = values_a + [ctx.zero] * (size - len(values_a))
|
|
65
|
+
padded_b = values_b + [ctx.zero] * (size - len(values_b))
|
|
66
|
+
|
|
67
|
+
spectrum_a = _fft_cooley_tuckey(ctx, padded_a)
|
|
68
|
+
spectrum_b = _fft_cooley_tuckey(ctx, padded_b)
|
|
69
|
+
spectrum_product = [a * b for a, b in zip(spectrum_a, spectrum_b)]
|
|
70
|
+
result = _fft_cooley_tuckey(ctx, spectrum_product, True)
|
|
71
|
+
return [value / size for value in result]
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def _fft_bluestein(ctx, values, inverse=False):
|
|
75
|
+
"""
|
|
76
|
+
This function implements Bluestein's algorithm for FFT
|
|
77
|
+
(or Inverse FFT) calulation.
|
|
78
|
+
|
|
79
|
+
https://en.wikipedia.org/wiki/Chirp_Z-transform#Bluestein's_algorithm
|
|
80
|
+
"""
|
|
81
|
+
n = len(values)
|
|
82
|
+
|
|
83
|
+
sign = ctx.one if inverse else -ctx.one
|
|
84
|
+
chirp = [ctx.expjpi(sign * j * j / n) for j in range(n)]
|
|
85
|
+
|
|
86
|
+
a = [values[j] * chirp[j] for j in range(n)]
|
|
87
|
+
b = [ctx.zero] * (2 * n - 1)
|
|
88
|
+
center = n - 1
|
|
89
|
+
for j in range(n):
|
|
90
|
+
b[center + j] = ctx.expjpi(-sign * j * j / n)
|
|
91
|
+
b[center - j] = ctx.expjpi(-sign * j * j / n)
|
|
92
|
+
|
|
93
|
+
convolution = _fft_convolve(ctx, a, b)
|
|
94
|
+
return [convolution[n - 1 + k] * chirp[k] for k in range(n)]
|
|
95
|
+
|
|
96
|
+
|
|
49
97
|
@defun
|
|
50
98
|
def fft(ctx, values):
|
|
51
99
|
r"""
|
|
52
100
|
Computes the Discrete Fourier Transform (DFT) of a sequence.
|
|
53
101
|
|
|
54
|
-
|
|
102
|
+
It uses the radix-2 Cooley-Tukey algorithm for power-of-two lengths
|
|
103
|
+
and Bluestein's algorithm for all other lengths.
|
|
55
104
|
|
|
56
105
|
**Examples**
|
|
57
106
|
|
|
@@ -63,27 +112,29 @@ def fft(ctx, values):
|
|
|
63
112
|
[(2.0 + 4.0j), (0.0 + 0.0j)]
|
|
64
113
|
>>> mp.fft([1, 2, 3, 4])
|
|
65
114
|
[10.0, (-2.0 + 2.0j), -2.0, (-2.0 - 2.0j)]
|
|
115
|
+
>>> [mp.chop(x) for x in mp.fft([1, 2, 1])]
|
|
116
|
+
[4.0, (-0.5 - 0.866025403784439j), (-0.5 + 0.866025403784439j)]
|
|
66
117
|
"""
|
|
67
118
|
n = len(values)
|
|
68
119
|
if n == 0:
|
|
69
120
|
return []
|
|
70
121
|
|
|
71
|
-
is_power_of_two = (n & (n - 1)) == 0
|
|
72
|
-
if not is_power_of_two:
|
|
73
|
-
raise NotImplementedError("FFT is only implemented for lengths that "
|
|
74
|
-
f"are powers of 2, got length: {n}")
|
|
75
|
-
|
|
76
122
|
converted_values = [ctx.convert(v) for v in values]
|
|
77
123
|
with ctx.extraprec(10):
|
|
78
|
-
|
|
124
|
+
if _is_power_of_two(n):
|
|
125
|
+
result = _fft_cooley_tuckey(ctx, converted_values)
|
|
126
|
+
else:
|
|
127
|
+
result = _fft_bluestein(ctx, converted_values)
|
|
79
128
|
return [+v for v in result]
|
|
80
129
|
|
|
130
|
+
|
|
81
131
|
@defun
|
|
82
132
|
def invfft(ctx, values):
|
|
83
133
|
r"""
|
|
84
134
|
Computes the inverse Discrete Fourier Transform (IDFT) of a sequence.
|
|
85
135
|
|
|
86
|
-
|
|
136
|
+
It uses the radix-2 Cooley-Tukey algorithm for power-of-two lengths
|
|
137
|
+
and Bluestein's algorithm for all other lengths.
|
|
87
138
|
|
|
88
139
|
**Examples**
|
|
89
140
|
|
|
@@ -94,17 +145,17 @@ def invfft(ctx, values):
|
|
|
94
145
|
>>> x = [1, 2, 3, 4]
|
|
95
146
|
>>> mp.invfft(mp.fft(x))
|
|
96
147
|
[(1.0 + 0.0j), (2.0 + 0.0j), (3.0 + 0.0j), (4.0 + 0.0j)]
|
|
148
|
+
>>> mp.invfft(mp.fft([1.0 + 1.0j, 2.0 + 2.0j, 3.0 + 3.0j]))
|
|
149
|
+
[(1.0 + 1.0j), (2.0 + 2.0j), (3.0 + 3.0j)]
|
|
97
150
|
"""
|
|
98
151
|
n = len(values)
|
|
99
152
|
if n == 0:
|
|
100
153
|
return []
|
|
101
154
|
|
|
102
|
-
is_power_of_two = (n & (n - 1)) == 0
|
|
103
|
-
if not is_power_of_two:
|
|
104
|
-
raise NotImplementedError("Inverse FFT is only implemented for lengths that "
|
|
105
|
-
f"are powers of 2, got length: {n}")
|
|
106
|
-
|
|
107
155
|
converted_values = [ctx.convert(v) for v in values]
|
|
108
156
|
with ctx.extraprec(10):
|
|
109
|
-
|
|
157
|
+
if _is_power_of_two(n):
|
|
158
|
+
result = _fft_cooley_tuckey(ctx, converted_values, True)
|
|
159
|
+
else:
|
|
160
|
+
result = _fft_bluestein(ctx, converted_values, True)
|
|
110
161
|
return [val / n for val in result]
|
|
@@ -806,7 +806,7 @@ maxterms, or set zeroprec."""
|
|
|
806
806
|
"""
|
|
807
807
|
x = ctx.convert(x)
|
|
808
808
|
*_, e, bc = x._mpf_
|
|
809
|
-
return ctx.make_mpf((0,
|
|
809
|
+
return ctx.make_mpf((0, MPZ_ONE, e + bc - ctx.prec, 1))
|
|
810
810
|
|
|
811
811
|
def fneg(ctx, x, prec=None, dps=None, rounding=round_nearest, exact=False):
|
|
812
812
|
"""
|