mpmath 1.5.0a0__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.
Files changed (274) hide show
  1. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.github/CONTRIBUTING.rst +1 -1
  2. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.github/workflows/coverage.yml +2 -2
  3. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.github/workflows/docs.yml +4 -5
  4. mpmath-1.5.0a2/.github/workflows/linter.yml +13 -0
  5. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.github/workflows/publish.yml +2 -2
  6. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.github/workflows/test.yml +15 -5
  7. mpmath-1.5.0a2/.pre-commit-config.yaml +22 -0
  8. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/CHANGES +55 -1
  9. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/PKG-INFO +9 -8
  10. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/README.rst +4 -3
  11. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/conftest.py +1 -9
  12. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/basics.rst +86 -3
  13. mpmath-1.5.0a2/docs/calculus/fft.rst +13 -0
  14. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/calculus/index.rst +1 -0
  15. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/calculus/inverselaplace.rst +1 -1
  16. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/calculus/optimization.rst +1 -1
  17. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/calculus/sums_limits.rst +0 -1
  18. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/contexts.rst +2 -2
  19. mpmath-1.5.0a2/docs/functions/abelian.rst +39 -0
  20. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/bessel.rst +5 -3
  21. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/constants.rst +3 -3
  22. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/elliptic.rst +13 -0
  23. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/index.rst +1 -0
  24. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/powers.rst +3 -3
  25. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/general.rst +7 -4
  26. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/identification.rst +10 -0
  27. mpmath-1.5.0a2/docs/plots/rtheta.png +0 -0
  28. mpmath-1.5.0a2/docs/plots/rtheta.py +12 -0
  29. mpmath-1.5.0a2/docs/plots/rtheta_surface.png +0 -0
  30. mpmath-1.5.0a2/docs/plots/rtheta_surface.py +9 -0
  31. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plotting.rst +0 -1
  32. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/setup.rst +2 -2
  33. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/technical.rst +3 -3
  34. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/__init__.py +18 -0
  35. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/__main__.py +7 -1
  36. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/_version.py +3 -3
  37. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/__init__.py +1 -0
  38. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/approximation.py +2 -0
  39. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/differentiation.py +26 -17
  40. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/extrapolation.py +30 -10
  41. mpmath-1.5.0a2/mpmath/calculus/fft.py +161 -0
  42. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/inverselaplace.py +65 -37
  43. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/optimization.py +24 -15
  44. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/quadrature.py +21 -16
  45. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/ctx_base.py +9 -3
  46. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/ctx_fp.py +4 -1
  47. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/ctx_iv.py +13 -3
  48. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/ctx_mp.py +48 -17
  49. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/ctx_mp_python.py +43 -23
  50. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/function_docs.py +18 -31
  51. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/__init__.py +1 -0
  52. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/bessel.py +236 -37
  53. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/elliptic.py +901 -25
  54. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/factorials.py +13 -2
  55. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/functions.py +75 -37
  56. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/hypergeometric.py +138 -23
  57. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/orthogonal.py +87 -21
  58. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/qfunctions.py +12 -10
  59. mpmath-1.5.0a2/mpmath/functions/riemann_theta.py +1119 -0
  60. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/rszeta.py +1 -1
  61. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/theta.py +154 -98
  62. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/zeta.py +19 -21
  63. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/zetazeros.py +2 -0
  64. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/identification.py +268 -8
  65. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libfp.py +1 -1
  66. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libmp/gammazeta.py +4 -2
  67. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libmp/libelefun.py +15 -15
  68. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libmp/libintmath.py +6 -2
  69. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libmp/libmpc.py +36 -31
  70. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libmp/libmpf.py +268 -79
  71. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libmp/libmpi.py +3 -1
  72. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/matrices/linalg.py +12 -12
  73. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/matrices/matrices.py +11 -11
  74. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_basic_ops.py +54 -1
  75. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_calculus.py +86 -3
  76. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_cli.py +12 -0
  77. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_convert.py +30 -1
  78. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_demos.py +6 -0
  79. mpmath-1.5.0a2/mpmath/tests/test_elliptic.py +1485 -0
  80. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_extra_zeta.py +9 -0
  81. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_format.py +115 -3
  82. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_fp.py +10 -0
  83. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_functions.py +744 -1
  84. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_functions2.py +27 -5
  85. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_hp.py +1 -1
  86. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_interval.py +45 -0
  87. mpmath-1.5.0a2/mpmath/tests/test_lattice.py +358 -0
  88. mpmath-1.5.0a2/mpmath/tests/test_riemann_theta.py +439 -0
  89. mpmath-1.5.0a2/mpmath/tests/test_riemann_theta_derivatives.py +401 -0
  90. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_rootfinding.py +15 -1
  91. mpmath-1.5.0a2/mpmath/tests/test_str.py +159 -0
  92. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_trig.py +14 -1
  93. mpmath-1.5.0a2/mpmath/tests/test_visualization.py +92 -0
  94. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/visualization.py +21 -7
  95. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath.egg-info/PKG-INFO +9 -8
  96. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath.egg-info/SOURCES.txt +12 -0
  97. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath.egg-info/requires.txt +4 -3
  98. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath.egg-info/scm_file_list.json +208 -196
  99. mpmath-1.5.0a2/mpmath.egg-info/scm_version.json +8 -0
  100. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/pyproject.toml +14 -10
  101. mpmath-1.5.0a0/.github/workflows/linter.yml +0 -15
  102. mpmath-1.5.0a0/mpmath/tests/test_elliptic.py +0 -683
  103. mpmath-1.5.0a0/mpmath/tests/test_str.py +0 -52
  104. mpmath-1.5.0a0/mpmath/tests/test_visualization.py +0 -34
  105. mpmath-1.5.0a0/mpmath.egg-info/scm_version.json +0 -8
  106. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.codecov.yml +0 -0
  107. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.gitattributes +0 -0
  108. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.github/dependabot.yml +0 -0
  109. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.gitignore +0 -0
  110. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/.readthedocs.yaml +0 -0
  111. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/CITATION.bib +0 -0
  112. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/LICENSE +0 -0
  113. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/demo/mandelbrot.py +0 -0
  114. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/demo/manydigits.py +0 -0
  115. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/demo/pidigits.py +0 -0
  116. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/demo/plotting.py +0 -0
  117. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/demo/sofa.py +0 -0
  118. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/demo/taylor.py +0 -0
  119. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/calculus/approximation.rst +0 -0
  120. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/calculus/differentiation.rst +0 -0
  121. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/calculus/integration.rst +0 -0
  122. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/calculus/odes.rst +0 -0
  123. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/calculus/polynomials.rst +0 -0
  124. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/cli.rst +0 -0
  125. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/conf.py +0 -0
  126. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/expintegrals.rst +0 -0
  127. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/gamma.rst +0 -0
  128. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/hyperbolic.rst +0 -0
  129. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/hypergeometric.rst +0 -0
  130. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/numtheory.rst +0 -0
  131. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/orthogonal.rst +0 -0
  132. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/qfunctions.rst +0 -0
  133. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/signals.rst +0 -0
  134. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/trigonometric.rst +0 -0
  135. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/functions/zeta.rst +0 -0
  136. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/genindex.rst +0 -0
  137. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/index.rst +0 -0
  138. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/matrices.rst +0 -0
  139. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ai.png +0 -0
  140. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ai.py +0 -0
  141. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ai_c.png +0 -0
  142. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ai_c.py +0 -0
  143. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ber.png +0 -0
  144. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ber.py +0 -0
  145. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besseli.png +0 -0
  146. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besseli.py +0 -0
  147. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besseli_c.png +0 -0
  148. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besseli_c.py +0 -0
  149. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besselj.png +0 -0
  150. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besselj.py +0 -0
  151. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besselj_c.png +0 -0
  152. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besselj_c.py +0 -0
  153. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besselk.png +0 -0
  154. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besselk.py +0 -0
  155. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besselk_c.png +0 -0
  156. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/besselk_c.py +0 -0
  157. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/bessely.png +0 -0
  158. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/bessely.py +0 -0
  159. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/bessely_c.png +0 -0
  160. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/bessely_c.py +0 -0
  161. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/bi.png +0 -0
  162. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/bi.py +0 -0
  163. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/bi_c.png +0 -0
  164. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/bi_c.py +0 -0
  165. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/buildplots.py +0 -0
  166. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/chebyt.png +0 -0
  167. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/chebyt.py +0 -0
  168. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/chebyu.png +0 -0
  169. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/chebyu.py +0 -0
  170. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/coulombf.png +0 -0
  171. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/coulombf.py +0 -0
  172. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/coulombf_c.png +0 -0
  173. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/coulombf_c.py +0 -0
  174. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/coulombg.png +0 -0
  175. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/coulombg.py +0 -0
  176. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/coulombg_c.png +0 -0
  177. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/coulombg_c.py +0 -0
  178. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ellipe.png +0 -0
  179. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ellipe.py +0 -0
  180. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ellipf.png +0 -0
  181. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ellipf.py +0 -0
  182. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ellipk.png +0 -0
  183. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ellipk.py +0 -0
  184. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ellippi.png +0 -0
  185. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ellippi.py +0 -0
  186. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/gi.png +0 -0
  187. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/gi.py +0 -0
  188. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/gi_c.png +0 -0
  189. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/gi_c.py +0 -0
  190. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hankel1.png +0 -0
  191. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hankel1.py +0 -0
  192. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hankel1_c.png +0 -0
  193. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hankel1_c.py +0 -0
  194. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hankel2.png +0 -0
  195. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hankel2.py +0 -0
  196. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hankel2_c.png +0 -0
  197. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hankel2_c.py +0 -0
  198. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hermite.png +0 -0
  199. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hermite.py +0 -0
  200. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hi.png +0 -0
  201. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hi.py +0 -0
  202. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hi_c.png +0 -0
  203. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/hi_c.py +0 -0
  204. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ker.png +0 -0
  205. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/ker.py +0 -0
  206. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/kleinj.png +0 -0
  207. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/kleinj.py +0 -0
  208. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/kleinj2.png +0 -0
  209. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/kleinj2.py +0 -0
  210. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/laguerre.png +0 -0
  211. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/laguerre.py +0 -0
  212. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/lambertw.png +0 -0
  213. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/lambertw.py +0 -0
  214. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/lambertw_c.png +0 -0
  215. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/lambertw_c.py +0 -0
  216. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/legendre.png +0 -0
  217. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/legendre.py +0 -0
  218. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/lommels1.png +0 -0
  219. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/lommels1.py +0 -0
  220. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/lommels2.png +0 -0
  221. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/lommels2.py +0 -0
  222. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/pcfd.png +0 -0
  223. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/pcfd.py +0 -0
  224. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm40.png +0 -0
  225. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm40.py +0 -0
  226. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm41.png +0 -0
  227. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm41.py +0 -0
  228. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm42.png +0 -0
  229. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm42.py +0 -0
  230. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm43.png +0 -0
  231. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm43.py +0 -0
  232. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm44.png +0 -0
  233. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/plots/spherharm44.py +0 -0
  234. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/docs/references.rst +0 -0
  235. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/_interactive.py +0 -0
  236. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/calculus.py +0 -0
  237. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/odes.py +0 -0
  238. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/calculus/polynomials.py +0 -0
  239. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/expintegrals.py +0 -0
  240. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/functions/signals.py +0 -0
  241. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libmp/__init__.py +0 -0
  242. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libmp/backend.py +0 -0
  243. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/libmp/libhyper.py +0 -0
  244. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/matrices/__init__.py +0 -0
  245. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/matrices/calculus.py +0 -0
  246. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/matrices/eigen.py +0 -0
  247. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/matrices/eigen_symmetric.py +0 -0
  248. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_bitwise.py +0 -0
  249. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_compatibility.py +0 -0
  250. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_diff.py +0 -0
  251. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_division.py +0 -0
  252. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_eigen.py +0 -0
  253. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_eigen_symmetric.py +0 -0
  254. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_extra_gamma.py +0 -0
  255. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_gammazeta.py +0 -0
  256. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_identify.py +0 -0
  257. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_levin.py +0 -0
  258. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_linalg.py +0 -0
  259. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_matrices.py +0 -0
  260. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_module.py +0 -0
  261. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_mpmath.py +0 -0
  262. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_ode.py +0 -0
  263. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_pickle.py +0 -0
  264. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_power.py +0 -0
  265. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_quad.py +0 -0
  266. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_special.py +0 -0
  267. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_summation.py +0 -0
  268. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_torture.py +0 -0
  269. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/tests/test_version_frozen.sh +0 -0
  270. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath/usertools.py +0 -0
  271. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath.egg-info/dependency_links.txt +0 -0
  272. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath.egg-info/top_level.txt +0 -0
  273. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/mpmath.egg-info/zip-safe +0 -0
  274. {mpmath-1.5.0a0 → mpmath-1.5.0a2}/setup.cfg +0 -0
@@ -35,7 +35,7 @@ All work should be submitted via `Pull Requests (PR)`_.
35
35
 
36
36
  4. Please conform to `PEP 8`_; run::
37
37
 
38
- flake518
38
+ ruff check
39
39
 
40
40
  to check formatting.
41
41
 
@@ -8,10 +8,10 @@ jobs:
8
8
  env:
9
9
  PYTEST_ADDOPTS: --cov mpmath --cov-append -n auto
10
10
  steps:
11
- - uses: actions/checkout@v6
11
+ - uses: actions/checkout@v7
12
12
  with:
13
13
  fetch-depth: 0
14
- - uses: actions/setup-python@v6
14
+ - uses: actions/setup-python@v7
15
15
  with:
16
16
  python-version: "3.x"
17
17
  - name: Install dependencies
@@ -4,10 +4,10 @@ jobs:
4
4
  docs:
5
5
  runs-on: ubuntu-24.04
6
6
  steps:
7
- - uses: actions/checkout@v6
7
+ - uses: actions/checkout@v7
8
8
  with:
9
9
  fetch-depth: 0
10
- - uses: actions/setup-python@v6
10
+ - uses: actions/setup-python@v7
11
11
  with:
12
12
  python-version: "3.x"
13
13
  - name: Install libs
@@ -20,9 +20,8 @@ jobs:
20
20
  pip install --upgrade .[docs]
21
21
  - name: Building docs
22
22
  run: |
23
- alias sphinx-build='sphinx-build --color -W --keep-going'
24
- sphinx-build -b html docs build/sphinx/html
25
- sphinx-build -b latex docs build/sphinx/latex
23
+ sphinx-build --color -W --keep-going -b html docs build/sphinx/html
24
+ sphinx-build --color -W --keep-going -b latex docs build/sphinx/latex
26
25
  make -C build/sphinx/latex all-pdf
27
26
  env:
28
27
  NO_COLOR: 1 # workaround for sphinx-contrib/autoprogram#76
@@ -0,0 +1,13 @@
1
+ name: Linting with ruff, etc
2
+ on: [workflow_dispatch, workflow_call]
3
+ jobs:
4
+ linter:
5
+ runs-on: ubuntu-24.04
6
+ steps:
7
+ - uses: actions/checkout@v7
8
+ with:
9
+ fetch-depth: 0
10
+ - uses: actions/setup-python@v7
11
+ with:
12
+ python-version: "3.x"
13
+ - uses: j178/prek-action@v3.0.0
@@ -5,10 +5,10 @@ jobs:
5
5
  name: Build distributions
6
6
  runs-on: ubuntu-24.04
7
7
  steps:
8
- - uses: actions/checkout@v6
8
+ - uses: actions/checkout@v7
9
9
  with:
10
10
  fetch-depth: 0
11
- - uses: actions/setup-python@v6
11
+ - uses: actions/setup-python@v7
12
12
  with:
13
13
  python-version: "3.x"
14
14
  - run: pip install build
@@ -5,6 +5,9 @@ on:
5
5
  workflow_dispatch:
6
6
  schedule:
7
7
  - cron: '0 0 * * 2'
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10
+ cancel-in-progress: true
8
11
  jobs:
9
12
  linter:
10
13
  uses: ./.github/workflows/linter.yml
@@ -15,10 +18,10 @@ jobs:
15
18
  frozen-version:
16
19
  runs-on: ubuntu-24.04
17
20
  steps:
18
- - uses: actions/checkout@v6
21
+ - uses: actions/checkout@v7
19
22
  with:
20
23
  fetch-depth: 0
21
- - uses: actions/setup-python@v6
24
+ - uses: actions/setup-python@v7
22
25
  with:
23
26
  python-version: "3.x"
24
27
  - name: Run frozen version test
@@ -42,20 +45,27 @@ jobs:
42
45
  purepy: true
43
46
  - python-version: pypy3.11
44
47
  purepy: true
48
+ - python-version: graalpy-25
49
+ purepy: true
50
+ - python-version: pypy3.11
51
+ nogmpy: true
45
52
  env:
46
53
  PYTEST_ADDOPTS: -n auto --durations=20
47
54
  steps:
48
- - uses: actions/checkout@v6
55
+ - uses: actions/checkout@v7
49
56
  with:
50
57
  fetch-depth: 0
58
+ - run: sudo apt-get update
59
+ - run: sudo apt-get install zlib1g-dev libjpeg8-dev
51
60
  - name: Set up Python ${{ matrix.python-version }}
52
- uses: actions/setup-python@v6
61
+ uses: actions/setup-python@v7
53
62
  with:
54
63
  python-version: ${{ matrix.python-version }}
55
64
  allow-prereleases: true
65
+ check-latest: true
66
+ - run: pip install --upgrade setuptools pip
56
67
  - name: Install dependencies
57
68
  run: |
58
- pip install --upgrade setuptools pip
59
69
  pip install --upgrade .[develop,gmpy2,gmp,ci]
60
70
  - run: pip uninstall -y gmpy2
61
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
@@ -9,6 +9,20 @@ Features:
9
9
  * Add Brent root-finding algorithm, see #1103 (Ayush Baranwal)
10
10
  * Correct integral path of the lerchphi() to use Laplace transform
11
11
  integral, see #1109 (Sergey B Kirpichev)
12
+ * Add Weierstrass elliptic functions, see #1113, #1117,
13
+ #1141, #1146 and #1157 (Graham Hesketh)
14
+ * Implement the modified spherical bessel functions spherical_in()
15
+ and spherical_kn(), see #1121 (Warren Weckesser)
16
+ * Add ulp(), see #1144 (Sergey B Kirpichev)
17
+ * Use round_nearest in repr/str and as default mpf's rounding mode,
18
+ see #1153 (Sergey B Kirpichev)
19
+ * Add shortest_str context option to enable using shortest decimal
20
+ representations in str/repr/format output, see #1115 (Sergey B Kirpichev)
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)
12
26
 
13
27
  Compatibility:
14
28
 
@@ -23,6 +37,8 @@ Compatibility:
23
37
  * Use asc=True per default for polynomial functions, see
24
38
  #1057 (Sergey B Kirpichev)
25
39
  * Restrict libmp exports to public API, see #1089 (Sergey B Kirpichev)
40
+ * Use explicit kwargs in public API, where possible,
41
+ see #1127 (Sergey B Kirpichev)
26
42
 
27
43
  Bug fixes:
28
44
 
@@ -57,6 +73,42 @@ Bug fixes:
57
73
  see #1101 (Vincent Gao)
58
74
  * Reorganize fixed-precision computations for theta3 to avoid
59
75
  severe cancellation, see #1107 (Sergey B Kirpichev)
76
+ * Fix fp.hypsum() to exit if ZeroDivisionError occurs and t==0,
77
+ see #1112 (Sergey B Kirpichev)
78
+ * Fix chebyfit IndexError when N <= 0, see #1114 (Vincent Gao)
79
+ * Use generic modular transformations to compute jtheta() with
80
+ |q| ~ 1, see #1111 (Sergey B Kirpichev, Jam Balaya)
81
+ * Fix repr_dps() to produce a correct estimate for prec!=53,
82
+ see #1118 (Sergey B Kirpichev)
83
+ * Use quasi-periodicity property (DLMF, §20.2(ii)) to compute
84
+ jtheta(), *_theta2/3a() helpers now not needed, see #1120
85
+ (Sergey B Kirpichev)
86
+ * Close leftover figure in plot/cplot/splot on error,
87
+ see #1123 (Apoorv Darshan)
88
+ * Better document None return value of the pslq(), see
89
+ #1134 (Sergey B Kirpichev)
90
+ * Fix last-digit rounding of the "f" format type, see #1132 (Vincent Gao)
91
+ * Use CoW pattern to manage constant_memo() cache, see
92
+ #1138 (Sergey B Kirpichev)
93
+ * Widen to_str's digit window so str/nstr rounds near-boundary values
94
+ correctly, see #1139 (Vincent Gao)
95
+ * Correct definitions for spherical Bessel functions, see #1143
96
+ (Sergey B Kirpichev)
97
+ * Added 2 new expceptions to Rosser's Rule, se #1148 (catalin-hanga)
98
+ * Avoid spurious overflow in fp gammaprod, see #1150 (Sanjay Santhanam)
99
+ * Document pretty_dps context's option, see #1153 (Sergey B Kirpichev)
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)
60
112
 
61
113
  Maintenance:
62
114
 
@@ -68,6 +120,8 @@ Maintenance:
68
120
  * Fix test_sn_cn_dn_identities(), see #1106 (Sergey B Kirpichev)
69
121
  * Fix test_compatibility(): avoid using of private numpy
70
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)
71
125
 
72
126
 
73
127
  --1.4.1--
@@ -686,7 +740,7 @@ General changes:
686
740
  use of alternative contexts (the mpmath.mp object provides the default
687
741
  implementation)
688
742
  * Implemented a context for fast double-precision arithmetic using Python
689
- types (mpmath.fp)
743
+ types (mpmath.fp)
690
744
  * Implemented hooks for importing a faster version of mp arithmetic from Sage
691
745
  * Implemented optimized fp versions of certain functions (including erf, erfc,
692
746
  gamma, digamma, ei, e1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mpmath
3
- Version: 1.5.0a0
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; python_version < "3.15" and extra == "tests"
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; python_version < "3.15" and extra == "tests"
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
- precision libraries, whose documentation has been helpful
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 for PyPy 3.11.
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
- precision libraries, whose documentation has been helpful
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 for PyPy 3.11.
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():
@@ -31,5 +22,6 @@ def reset_mp_globals():
31
22
  mpmath.mp.pretty = False
32
23
  mpmath.mp.rounding = 'n'
33
24
  mpmath.mp.pretty_dps = "str"
25
+ mpmath.mp.shortest_str = False
34
26
  mpmath.iv.prec = mpmath.mp.prec
35
27
  mpmath.iv.pretty = False
@@ -82,6 +82,8 @@ Mpmath uses a global working precision; it does not keep track of the precision
82
82
  mp.dps = 15 [default: 15]
83
83
  mp.rounding = 'n' [default: 'n']
84
84
  mp.trap_complex = False [default: False]
85
+ mp.pretty_dps = 'str' [default: 'str']
86
+ mp.shortest_str = False [default: False]
85
87
 
86
88
  The term **prec** denotes the binary precision (measured in bits) while **dps** (short for *decimal places*) is the decimal precision. Binary and decimal precision are related roughly according to the formula ``prec = 3.33*dps``. For example, it takes a precision of roughly 333 bits to hold an approximation of pi that is accurate to 100 decimal places (actually slightly more than 333 bits is used).
87
89
 
@@ -97,10 +99,10 @@ When the precision has been set, all ``mpf`` operations are carried out at that
97
99
 
98
100
  >>> mp.dps = 50
99
101
  >>> mpf(1) / 6
100
- mpf('0.16666666666666666666666666666666666666666666666666656')
102
+ mpf('0.1666666666666666666666666666666666666666666666666666')
101
103
  >>> mp.dps = 25
102
104
  >>> mpf(2) ** mpf('0.5')
103
- mpf('1.414213562373095048801688713')
105
+ mpf('1.41421356237309504880168871')
104
106
 
105
107
  The precision of complex arithmetic is also controlled by the ``mp`` object:
106
108
 
@@ -207,6 +209,20 @@ Note that when creating a new ``mpf``, the value will at most be as accurate as
207
209
 
208
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.)
209
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
+
210
226
  Printing
211
227
  --------
212
228
 
@@ -233,11 +249,39 @@ Setting the ``mp.pretty`` option will use the ``str()``-style output for ``repr(
233
249
  >>> mpf(0.6)
234
250
  mpf('0.59999999999999998')
235
251
 
236
- To use enough digits to be able recreate value exactly, set ``mp.pretty_dps``
252
+ To use enough digits to be able recreate value exactly, enable
253
+ ``mp.shortest_str`` option. With this, repr/str and the new-style string
254
+ formatting *without format specifier* will use *minimal* number of decimal
255
+ digits that will preserve value on string input, like repr for CPython's
256
+ builtin floats:
257
+
258
+ >>> mp.shortest_str = True
259
+ >>> mp.pretty = True
260
+ >>> mpf(10.9) == mpf("10.9")
261
+ True
262
+ >>> mpf(10.9)
263
+ 10.9
264
+ >>> f"{_}"
265
+ '10.9'
266
+ >>> mp.pretty = False
267
+ >>> mpf(10.9)
268
+ mpf('10.9')
269
+ >>> mp.shortest_str = False
270
+
271
+ Alternatively, set ``mp.pretty_dps``
237
272
  to ``"repr"`` (default value is ``"str"``). Same option is used to control
238
273
  default number of digits in the new-style string formatting *without format
239
274
  specifier*, i.e. ``format(exp(mpf(1)))``.
240
275
 
276
+ >>> mp.pretty = True
277
+ >>> mpf(0.1)
278
+ 0.1
279
+ >>> mp.pretty_dps = "repr"
280
+ >>> mpf(0.1)
281
+ 0.10000000000000001
282
+ >>> mp.pretty_dps = "str"
283
+ >>> mp.pretty = False
284
+
241
285
  The number of digits with which numbers are printed by default is determined by
242
286
  the working precision. To specify the number of digits to show without
243
287
  changing the working precision, use :func:`format syntax support
@@ -251,3 +295,42 @@ changing the working precision, use :func:`format syntax support
251
295
  '0.16666667'
252
296
  >>> f'{a:.50}'
253
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
@@ -0,0 +1,13 @@
1
+ Fast Fourier Transform
2
+ ----------------------------------
3
+
4
+ FFT
5
+ ...
6
+
7
+ .. autofunction:: mpmath.fft
8
+
9
+
10
+ Inverse FFT
11
+ ...........
12
+
13
+ .. autofunction:: mpmath.invfft
@@ -12,3 +12,4 @@ Numerical calculus
12
12
  odes
13
13
  approximation
14
14
  inverselaplace
15
+ fft
@@ -55,7 +55,7 @@ using the existing interface):
55
55
  >>> ft = lambda t: exp(-t) - exp(-1000*t)
56
56
  >>> fpvec = [fp(p) for p in myTalbot.p]
57
57
  >>> ft(t)-myTalbot.calc_time_domain_solution(fpvec,t,manual_prec=True)
58
- mpf('1.928300179528890061756872185e-21')
58
+ mpf('1.92830017952889006175687218e-21')
59
59
 
60
60
  This manual approach is also useful to look at the Laplace parameter,
61
61
  order, or working precision which were computed.
@@ -4,7 +4,7 @@ Root-finding and optimization
4
4
  Root-finding (``findroot``)
5
5
  ...........................
6
6
 
7
- .. autofunction:: mpmath.findroot(f, x0, solver=Secant, tol=None, verbose=False, verify=True, **kwargs)
7
+ .. autofunction:: mpmath.findroot
8
8
 
9
9
  Solvers
10
10
  ^^^^^^^
@@ -64,4 +64,3 @@ properties of the algorithms.
64
64
  :func:`~mpmath.cohen_alt`
65
65
  ^^^^^^^^^^^^^^^^^^^^^^^^^^
66
66
  .. autofunction:: mpmath.cohen_alt
67
-
@@ -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()` branch
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
@@ -38,6 +38,8 @@ Spherical Bessel functions
38
38
 
39
39
  .. autofunction:: mpmath.spherical_jn
40
40
  .. autofunction:: mpmath.spherical_yn
41
+ .. autofunction:: mpmath.spherical_in
42
+ .. autofunction:: mpmath.spherical_kn
41
43
 
42
44
 
43
45
  Kelvin functions
@@ -92,9 +94,9 @@ Coulomb wave functions
92
94
  Confluent U and Whittaker functions
93
95
  ...................................
94
96
 
95
- .. autofunction:: mpmath.hyperu(a, b, z)
96
- .. autofunction:: mpmath.whitm(k,m,z)
97
- .. autofunction:: mpmath.whitw(k,m,z)
97
+ .. autofunction:: mpmath.hyperu
98
+ .. autofunction:: mpmath.whitm
99
+ .. autofunction:: mpmath.whitw
98
100
 
99
101
 
100
102
  Parabolic cylinder functions
@@ -22,11 +22,11 @@ function::
22
22
  >>> pi
23
23
  <pi: 3.14159~>
24
24
  >>> 2*pi
25
- mpf('6.283185307179586476925286766559005768394338')
25
+ mpf('6.28318530717958647692528676655900576839434')
26
26
  >>> +pi
27
- mpf('3.141592653589793238462643383279502884197169')
27
+ mpf('3.14159265358979323846264338327950288419717')
28
28
  >>> pi()
29
- mpf('3.141592653589793238462643383279502884197169')
29
+ mpf('3.14159265358979323846264338327950288419717')
30
30
 
31
31
  The predefined objects ``j`` (imaginary unit), ``inf`` (positive infinity) and
32
32
  ``nan`` (not-a-number) are shortcuts to ``mpc`` and ``mpf`` instances with
@@ -13,6 +13,8 @@ Elliptic arguments
13
13
  .. autofunction:: mpmath.mfrom
14
14
  .. autofunction:: mpmath.kfrom
15
15
  .. autofunction:: mpmath.taufrom
16
+ .. autofunction:: mpmath.g2g3from
17
+ .. autofunction:: mpmath.omega1omega2from
16
18
 
17
19
 
18
20
  Legendre elliptic integrals
@@ -46,8 +48,19 @@ Jacobi elliptic functions
46
48
  .. autofunction:: mpmath.ellipfun
47
49
 
48
50
 
51
+ Weierstrass elliptic functions
52
+ ..............................
53
+
54
+ .. autofunction:: mpmath.weierp
55
+ .. autofunction:: mpmath.weierpprime
56
+ .. autofunction:: mpmath.weiersigma
57
+ .. autofunction:: mpmath.weierzeta
58
+ .. autofunction:: mpmath.weierpinv
59
+
60
+
49
61
  Modular functions
50
62
  .................
51
63
 
52
64
  .. autofunction:: mpmath.eta
53
65
  .. autofunction:: mpmath.kleinj
66
+ .. autofunction:: mpmath.kleinjinv
@@ -17,6 +17,7 @@ Mpmath implements the standard functions from Python's ``math`` and ``cmath`` mo
17
17
  orthogonal
18
18
  hypergeometric
19
19
  elliptic
20
+ abelian
20
21
  zeta
21
22
  numtheory
22
23
  qfunctions