- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 684
          build/pkgs/mpmath 1.4
          #38565
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
  
    build/pkgs/mpmath 1.4
  
  #38565
              
            Conversation
…dle mpmath types without Sage backend
…ion_doctest.py: Update class name in doctest output
| I did play with pdb yesterday. The code path in mpmath for sage integer inside mpmath is completely different. In fact the previous code path followed in 1.3.0 does not exist anymore. sage integer do not seem to be recognized as such in 1.4a1. | 
| I am wrong, it still exist but sage integer are diverted to a new code path before reaching the right one. In 1.4a1 it seems to take this new path https://github.com/mpmath/mpmath/blob/7afe9ac70c430f7df7e4bc1c904f90bd1887832f/mpmath/ctx_mp_python.py#L82 | 
| Re-ordering some code in  | 
| There is another internal mpmath path that seems to direct sage integers to be treated as rational. I had selected a simple test case to work with and it turns out it was exceptional. But at least I think we have a root cause. | 
| The following patch (it is against mpmath master, it may need a tweak for 1.4a1) fixes a number of conversion problem. As you can see from the structure of the patch, in current master of mpmath, sage integer are identified as  Unfortunately it is not all the problem with mpmath. Now, that I have taken care of this issue another one has gained greater visibility. again this one appears multiple times and across multiple files. | 
| 
 No need to backport this. I'll include sage fixes in next alpha release, see mpmath/mpmath#851 | 
| 
 Thank you for that. I was going to open an issue on mpmath to discuss it and follow it with a PR if you guys approved the approach. I must say the second issue has me stomped so far. I'll take any clue. | 
| The OverflowError coming from gmpy2. Could you run this test with MPMATH_NOGMPY=1 environment variable set? | 
| Yes indeed I have gmpy2 2.2.1. | 
| Hmm, could you try this workaround for L26 of all.py:  
 Was it installed from wheel or built locally? Is this M$ Windows? | 
| 
 This is Gentoo Linux, my package management builds it locally :) | 
| 
 Can you give me a more complete path. There are plenty of  | 
| Oh, wait mpmath. | 
| Yes, that works. | 
| 
 Good news, this is something, well, sane...  Looks like there is a bug in gmpy2 2.1.x, related with conversion to machine-size integers.  Or something is wrong with integration of sage & gmpy2 ( @casevh, I would appreciate if you could take a look. 
 ok. Are there other test failures? | 
| That fix took care of all the doctest that I am sure were caused by mpmath. I have number of doctest with other identified, or more likely sources. I have just that one left where I am not sure because I have not digged into it yet but that's just numerical noise. | 
| Well, I see no difference wrt 1.3.0: >>> from mpmath import *
>>> mp.prec=100
>>> ci(1j)
mpc(real='0.83786694098020824089467857943576', imag='1.5707963267948966192313216916397')
>>> str(_)
'(0.83786694098020824089467857944 + 1.5707963267948966192313216916j)'
>>> import mpmath 
>>> mpmath.__version__
'1.3.0' | 
| git blame says that value has been around for 13 years in sage and mpmath 1.3.0 has been in sage since July 2023. Not sure how this did not show up until now. | 
| Actually one doctest timeout and crash that I thought was caused by singular appears to be linked to mpmath-1.4.0 it seems to get stuck somewhere in gmpy, I have huge backtrace that I am not sure is very useful, but some of the interesting bits of the logs below  | 
| 
 Anyway, new answer seems to be correct. Also, Mathematica: 
 No, it's not gmpy2-related. But in 1.3.0 it quickly quits with NoConvergence exception, so there is a regression. Edit: mpmath/mpmath#852 | 
| Can we do the new version requirement separately? 1.4.0_alpha1 showed up in Gentoo and gets picked up by  | 
| Sure, feel free to cherry pick to a new PR… Sent from my phone On Tue, Sep 17, 2024 at 14:53 Michael Orlitzky ***@***.***> wrote:
 Can we do the new version requirement separately? 1.4.0_alpha1 showed up
 in Gentoo and gets picked up by ./configure.
 —
 Reply to this email directly, view it on GitHub
 <#38565 (comment)>, or
 unsubscribe
 <https://github.com/notifications/unsubscribe-auth/AB7VNBKWDQYJOR3YAYFDYXDZXCXE5AVCNFSM6AAAAABNEK4VSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJXGA3DOMRUGM>
 .
 You are receiving this because you were assigned.Message ID:
 ***@***.***>
 | 
sagemathgh-38691: build/pkgs/mpmath/version_requirements.txt: Reject 1.4 Cherry-picked from sagemath#38565 Gentoo has mpmath-1.4.0_alpha1 in the tree now, and we don't want `./configure` to use it yet. URL: sagemath#38691 Reported by: Michael Orlitzky Reviewer(s):
sagemathgh-38691: build/pkgs/mpmath/version_requirements.txt: Reject 1.4 Cherry-picked from sagemath#38565 Gentoo has mpmath-1.4.0_alpha1 in the tree now, and we don't want `./configure` to use it yet. URL: sagemath#38691 Reported by: Michael Orlitzky Reviewer(s):
📝 Checklist
⌛ Dependencies