I somehow tend to consider the following a parsing bug.
I would consider that the line starting with ")" is appended to the
previous line before ")" is interpreted as the introduction of a
compiler directive.
If I put a space before ")", the compilation succeeds.
Ralf
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" 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 http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
)abbrev domain RXSUP ReverseUnivariatePolynomial
ReverseUnivariatePolynomial(_
R: EntireRing, _
P: UnivariatePolynomialCategory R_
): UnivariatePolynomialCategory R == P add
Rep ==> P
rep x ==> (x@%) pretend Rep
per x ==> (x@Rep) pretend %
coerce(p: %): OutputForm ==
l: List(OutputForm) := [rep(t)::OutputForm for t in monomials p]
empty? l => (0$Integer)::OutputForm
reduce(_+, reverse! l)
unitNormal(p: %): Record(unit: %, canonical: %, associate: %) ==
uca: Record(unit: P, canonical: P, associate: P) := unitNormal rep p
if not zero? p then
c: R := first reverse! coefficients(uca.canonical)
if c=-1 then uca := [c*uca.unit, c*uca.canonical, c*uca.associate]
[per(uca.unit), per(uca.canonical), per(uca.associate)]