polynomial_modn_dense_ntl.pyx -- small_roots function -- minor change

46 views
Skip to first unread message

Adam Larat

unread,
Nov 4, 2020, 4:00:41 AM11/4/20
to sage-...@googlegroups.com
Hi everyone,

I hope I am posting at the correct place.

There is a minor bug in the verbose output of the small_roots function in Z/nZ[X].
At line 567 (Sage 9.2, I might not be absolutely up to date…) of the build/pkgs/sagelib/src/build/lib.linux-x86_64-3.8/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx file, the variable epsilon is output as a integer when it is actually a float
567:    verbose("epsilon = %d"%epsilon, level=2)
I attach a minimal working example which outputs variable epsilon as 0 when it is indeed strictly positive.
I would be glad to contribute if you indicate me the procedure to follow, or someone more powerful than me could just change the line to
567:    verbose("epsilon = %f"%epsilon, level=2)
and push on the repo?

Thank you very much for all your work,

Adam
MWE.py

Samuel Lelievre

unread,
Nov 5, 2020, 2:07:12 PM11/5/20
to sage-devel
Hi Adam,

thanks for noticing and reporting. The easiest way to contribute
the change you suggest is as follows:

- Open an account at GitLab.com
- Fork the repository https://gitlab.com/sagemath/sage
- Visit your forked copy of the repository at gitlab.com
- Edit the file there
- Send a merge request

This will automatically create a ticket on the Sage Trac server
with your changes, and from there they can be reviewed by
other developers and eventually merged.

Let us know if you run into any trouble.  Kind regards,  --Samuel

Michael Orlitzky

unread,
Nov 15, 2020, 3:32:20 PM11/15/20
to sage-...@googlegroups.com
On 11/4/20 3:37 AM, Adam Larat wrote:
> Hi everyone,
>
> I hope I am posting at the correct place.
>
> There is a minor bug in the verbose output of the small_roots function...

Thanks, this should be a quick fix:

https://trac.sagemath.org/ticket/30921

Michael Orlitzky

unread,
Nov 15, 2020, 3:39:07 PM11/15/20
to sage-...@googlegroups.com, Adam Larat
On 11/4/20 3:37 AM, Adam Larat wrote:
> I would be glad to contribute if you indicate me the procedure to
> follow,

Oh, I just saw this part now. Most of the process is covered by

https://doc.sagemath.org/html/en/developer/index.html

but can be simplified if you're used to contributing to open source
(particularly git) projects:

* Sign up for trac (first time only)
* Open a trac ticket
* Clone the sage git repo and switch to the "develop" branch
* Create your own branch off of "develop" named something like
u/<your-trac-username>/ticket/<trac-ticket-number>
* Fix the bug
* Push your branch
* Update the trac ticket with your branch's name, and mark it
"Needs review"
Reply all
Reply to author
Forward
0 new messages