Hi Waldek,
I just constructed an element with my code and somehow cannot find the bug.
I have something like this...
Finite0Series(C: Ring, var: Symbol, cen: C): Exports == Implementation where
UTS ==> UnivariateTaylorSeries(C, var, cen)
ULS ==> UnivariateLaurentSeries(C, var, cen)
Exports ==> UnivariateLaurentSeriesConstructorCategory(C, UTS) with
coerce: Variable(var) -> %
++ \spad{coerce(var)} converts the series variable \spad{var} into a
++ Laurent series.
coerce: ULS -> %
Implementation ==> ULS add
Rep ==> ULS
coerce(v : Variable(var)): % == monomial(1, 1)
coerce(s: ULS): % == per s
zero?(x: %): Boolean == order(x, 1) > 0
which I abbreviate by L. Then I did some computation and end up in
(73) -> series toEta p
>> System error:
The value 0 is not of type CONS.
where the type of this is actually L.
Now the weird thing happens here...
(73) -> ((series toEta p) pretend UnivariateLaurentSeries(C, 'q, 0))
3
Type: UnivariateLaurentSeries(Fraction(Integer),q,0)
(74) -> ((series toEta p) pretend UnivariateLaurentSeries(C, 'q, 0))
pretend L
3
Type: Finite0Series(Fraction(Integer),q,0)
This looks like "pretend" is actually doing something in this case.
I know, that this is not enough information, but I am somehow running
out of ideas of what I can do to localize the problem.
Interestingly, I've put some print statements into the "toEta" function.
Everything prints fine up to the final return. So I have no idea where
that error message comes from. It's also definitely not in the coercion
to OutputForm that happens automatically, because, the error also
happens when I add a semicolon after "series toEta p".
How can I trace that problem?
Thank you in advance
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 https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.