Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/src/polynomial.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ the usual ways of constructing an element of a ring.
(R::PolyRing)(c::elem_type(R))
(R::PolyRing{T})(a::T) where T <: RingElement
```
The third constructor above cannot be used to coerce a polynomial from one ring
to another; instead use evaluation, for instance: `f(y)` where `y` is the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But evaluation is not the best way. We can mention it, but really should be recommending map_coefficient here, ideally with a jldoctest usage example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that evaluation is impressively slow (and requires impressively much RAM): for the record, I tried mapping (x+1)^99999 from ZZ[x] to ZZ[y], and gave up after 600s CPU -- map_coefficients took less than 1s.

generator of the destination polynomial ring. The fourth constructor creates
a constant polynomial from an elements of the coefficient ring.

For polynommials there is also the following more general constructor accepting
For polynomials there is also the following more general constructor accepting
an array of coefficients.

```julia
Expand Down
Loading