BUG? in zerosOf

12 views
Skip to first unread message

Ralf Hemmecke

unread,
Jan 4, 2019, 9:56:13 AM1/4/19
to fricas-devel
Hi,

Riccardo Guida detected that the FricasUG in Section
"8.3.2 Using All Roots of a Polynomial" speaks of

zerosOf(y^4+y+1,y)

but displays the result in terms of %x0 and %x1.
That in itself is probably a minor issue. However,
it continues and shows the defining polynomial of %y0.

See below at (3). There is never shown anything like %a0, but still one
can ask for the defining polynomial of it. And indeed %a0 seems to be
assigned in the interpreter and shows as %y0.

I don't actually call this wrong, but it is certainly confusing.

The definition says...

zerosOf : (SparseUnivariatePolynomial %, Symbol) -> List %
++ zerosOf(p, y) returns \spad{[y1, ..., yn]} such that
\spad{p(yi) = 0}.
++ The yi's are expressed in radicals if possible, and otherwise
++ as implicit algebraic quantities containing
++ new symbols which display as \spad{'%z0}, \spad{'%z1}, ...;
++ The new symbols are bound in the interpreter
++ to respective values.

It doesn't make things any clearer. So maybe no bug, since the
interpreter seems to reuse existing values, but certainly strange behaviour.

Ralf

===============================================================

(1) -> zerosOf(y^4+y+1,y)

(1)
+-----------------------------+
| 2 2
\|- 3 %y1 - 2 %y0 %y1 - 3 %y0 - %y1 - %y0
[%y0, %y1, --------------------------------------------,
2
+-----------------------------+
| 2 2
- \|- 3 %y1 - 2 %y0 %y1 - 3 %y0 - %y1 - %y0
----------------------------------------------]
2
Type:
List(Expression(Integer))
(2) -> zerosOf(a^4+a+1,a)

(2)
+-----------------------------+
| 2 2
\|- 3 %y1 - 2 %y0 %y1 - 3 %y0 - %y1 - %y0
[%y0, %y1, --------------------------------------------,
2
+-----------------------------+
| 2 2
- \|- 3 %y1 - 2 %y0 %y1 - 3 %y0 - %y1 - %y0
----------------------------------------------]
2
Type:
List(Expression(Integer))
(3) -> definingPolynomial %a0

4
(3) %y0 + %y0 + 1
Type:
Expression(Integer)
(4) -> %a0

(4) %y0
Type:
Expression(Integer)
Reply all
Reply to author
Forward
0 new messages