Hello Waldek,
in the package I have written, I called (wrongly)
precision(e1)
and got the answer 1. That surprised me a bit, since e1 was of type
(171) -> e1
2 3
(171) 1 - q - q + O(q )
Type: QEtaTayloreries(Fraction(Integer))
and for that the function precision was not defined.
I cut the definition down to a simple file (attached).
The interpreter seems to find some way to convert an element of type
QEtaTaylorSeries(QQ) into QEtaTruncatedTaylorSeries(QQ) and that
although there is neither a coerce nor a convert or retract function
available.
The output of
)co foo.spad
)set stream calc 4
QQ ==> Fraction Integer
T ==> QEtaTaylorSeries(QQ)
q := monomial(1,1)$T
s := 2*recip(1-q)::T
)set message bottom on
precision s
surprisingly is
(69) -> s := 2*recip(1-q)::T
2 3 4 5
(69) 2 + 2 q + 2 q + 2 q + 2 q + O(q )
Type: QEtaTaylorSeries(Fraction(Integer))
(70) -> )set message bottom on
(70) -> precision s
Function Selection for precision
Arguments: QETATS(FRAC(INT))
-> no appropriate precision found in
QEtaTaylorSeries(Fraction(Integer))
-> no appropriate precision found in
QEtaTaylorSeries(Fraction(Integer))
Modemaps from Associated Packages
no modemaps
Remaining General Modemaps
[1] PositiveInteger -> PositiveInteger from D
if D has ATARBPR and D has FPS
[2] QEtaTruncatedTaylorSeries(D2) -> NonNegativeInteger
from QEtaTruncatedTaylorSeries(D2) if D2 has RING
[1] signature: QETATTS(QETATS(FRAC(INT))) -> NNI
implemented: slot (NonNegativeInteger) from
QETATTS(QETATS(FRAC(INT)))
[:> , QTTS: prec, 1]
[:> , *prec, 1]
[:> , x, [1]]
[:> , QTTS: prec, 1]
(70) 1
Type: PositiveInteger
What is the interpreter doing here? It somehow called
1$QEtaTaylorSeries(Fraction(Integer)), but why?
Is there a nice explanation that cannot be read from the modemap selection?
Thank you
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 view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/e122c6a2-3b21-6229-a70b-2f8a4e717c55%40hemmecke.org.
)cd
)cd tmp
)co ../foo.spad