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
roots(algorithm='numpy') does not work in arbitrary precision #8054
Comments
comment:1
Numpy does not do arbitrary precision things. So I suppose we should just document this. |
comment:2
still not done in 4.3.1. |
comment:3
Attachment: trac_8054.patch.gz |
Author: Mike Hansen |
comment:4
Mike, the warning message is just printed once, i.e., if one calls roots(algorithm='numpy') twice, Paul |
Reviewer: Paul Zimmermann |
comment:5
All test pass (with Sage 4.4.4). Thus I give a positive review. |
comment:6
Could someone rebase the patch against 4.6.alpha1 when it's released (soon) and restore the positive review? |
Work Issues: rebas |
comment:7
If someone is rebasing it, they might also correct a typo: Note that one should not use NumPy when wanting high precicion -> precision |
comment:8
by the way, is there a documentation somewhere explaining how to rebase a patch? Paul |
Changed work issues from rebas to rebase |
comment:9
Replying to @zimmermann6:
One way is to use Mercurial queues: $ cd SAGE_ROOT/devel/sage
$ hg qimport https://github.com/sagemath/sage-prod/files/10647755/trac_8054.patch.gz
adding trac_8054.patch to series file
$ hg qpush
applying trac_8054.patch
patching file sage/rings/polynomial/polynomial_element.pyx
Hunk #2 FAILED at 4256
1 out of 4 hunks FAILED -- saving rejects to file sage/rings/polynomial/polynomial_element.pyx.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh trac_8054.patch The file $ hg qrefresh
$ hg export qtip > /path/to/trac_8054.2.patch
$ hg qpop
$ hg qdelete trac_8054.patch should write out an updated patch and restore the original state of the repository. If you choose not to delete the patch from the queue, e.g., for doctesting, then for convenience you can use $ hg qrename trac_8054.2.patch to rename it in the queue. After this, There's more on using queues in the Developer's Guide, but as far as I can tell, there's no mention of rebasing patches. Let us know if you have questions. |
comment:10
Replying to @qed777: thank you. I will try when 4.6.alpha1 is available. Do you know when? Paul |
comment:11
Replying to @zimmermann6:
No problem. I hope I haven't made any mistakes! I very recently announced 4.6.alpha1 on sage-release. I've cc'd Rob Beezer about rebasing patches. |
Attachment: trac_8054.2.patch.gz original patch rebased on 4.6.alpha1 |
comment:12
Replying to @qed777:
done. Paul |
comment:13
I'll try to send Paul some rebase instructions that he might look over and then and maybe grow those into something for the Developer's Guide. Rob |
comment:14
The rebased patch applies cleanly to 4.6.alpha1. But testing just the changed file, I get
There's a stray tab in this line + ``algorithm='numpy'`` with high-precision types.) (in the patch). |
Changed work issues from rebase to none |
comment:15
Replying to @rbeezer:
Thanks, Rob. I wasn't sure whether this is in the Guide. I should reread it in full, soon. |
Attachment: trac_8054.3.patch.gz |
comment:16
sorry, I've replaced the tab. Apply only the last patch. Paul |
Merged: sage-4.6.alpha2 |
comment:18
Replying to @qed777:
Another possible way: $ hg import --no-commit filename.patch which just updates the working directory. Then you can check the .rej file, make changes, re-commit, and export anew. |
Consider the following example:
This is ok. Compare now with:
Clearly the precision given by numpy is only 14 digits, not 1000
digits as expected.
CC: @rbeezer
Component: numerical
Author: Mike Hansen
Reviewer: Paul Zimmermann
Merged: sage-4.6.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/8054
The text was updated successfully, but these errors were encountered: