-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Bizarre results when taking the mod of a p-adic number #7016
Comments
comment:1
Suggestions:
|
Author: jonhanke |
comment:3
This is a consequence of the fact that those two elements have different parents:
Most rings in sage return an element of the same ring when applying the operation %. The function you want is residue.
There are some tricky questions for % and // and how they relate. A similar issue bit William this past spring, so maybe we should have a design discussion about how to solve it. I'm probably not going to be working on the p-adics this fall though: my advisor wants me to work on my thesis. ;-) |
comment:4
I was just glancing through tickets and found this one. If anyone has suggestions for making % and // less confusing, please let me know. There's documentation, but it's hidden in double underscore methods, so often doesn't get seen. |
Changed author from jonhanke to Sandra Rozensztajn |
Commit: |
New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:12
Personally, I don't think that the sentence "This is different from the mod function |
comment:13
Replying to @roed314:
That may be, but it's still a poor excuse for having "bizarre" results for |
comment:14
Replying to @jdemeyer:
Actually there is already a detailled explanation of how the mod function works in its documentation, so the point of the note is mostly to direct people to the approriate documentation. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed author from Sandra Rozensztajn to Sandra Rozensztajn, Julian Rüth |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: David Roe |
comment:20
Looks good. |
Changed branch from u/saraedum/bizarre_results_when_taking_the_mod_of_a_p_adic_number to |
The operation x % n for p-adic numbers is confusing. Added a note about it in the documentation of the 'residue' function.
CC: @williamstein @sagetrac-mabshoff @roed314
Component: padics
Keywords: mod, %
Author: Sandra Rozensztajn, Julian Rüth
Branch/Commit:
a10c222
Reviewer: David Roe
Issue created by migration from https://trac.sagemath.org/ticket/7016
The text was updated successfully, but these errors were encountered: