#20889: truncated power for polynomials
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-7.3
Component: algebra | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/20889 | 7e24e7abb3c962d90f4c64ec14adae17fe3e1fd9
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by bruno):
Replying to [comment:6 vdelecroix]:
> I don't know. I do not think of `power_trunc` as a convenience function.
I want to use it in algorithms (like `nth_root`). We might propose
`_power_trunc_` (or `_power_trunc` or any other names) with restricted
types. And on the other hand `power_trunc` with arbitrary precision and
possibly negative input... Library calls would just override the
specialized function `_power_trunc_`. What do you think?
There are two things: About negative powers, I mostly don't care though it
may be handy to have the possibility. About large powers, I think that
public methods with integer inputs should be able to handle any element of
`ZZ`. So there are two solutions that I prefer against the current
situation: Either remove the static types, or manually catch the exception
for large powers. I suspect that the second solution cannot be implemented
while keeping the static types...
I find your solution of having both `power_mod` as public interface and
`_power_mod` is a good trade-off.
--
Ticket URL: <https://trac.sagemath.org/ticket/20889#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.