I wonder whether rootSplit in manip.spad is implemented correctly.
rootkernels l == select!((z1 : K) : Boolean +->
is?(operator z1, 'nthRoot), l)
rootSplit x ==
lk := rootkernels tower x
eval(x, lk, [rootExpand k for k in lk])
rootExpand k ==
x := first argument k
n := second argument k
op := operator k
op(numer(x)::F, n) / op(denom(x)::F, n)
AFAIU, it evaluates the rational function that represents x
by the respective "rootExpand"ed stuff.
With that implementation, it is no surprise that
for expr := sqrt(y+sqrt((z+1)/(z-1))))
rootSplit expr
gives back the same expression.
I wonder whether this indeed was the intention.
%%% (29) -> rootSplit((y + sqrt((z+1)/(z-1))))
+-----+ +-----+
\|z + 1 + y\|z - 1
(29) --------------------
+-----+
\|z - 1
%%% (30) -> rootSplit(sqrt(y + sqrt((z+1)/(z-1))))
+------------+
| +-----+
| |z + 1
(30) | |----- + y
\|\|z - 1
Otherwise I wonder why tower(x) is used and not just kernels(x).
Any opinions?
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/96c81016-1a7b-47cf-a551-9ad7c5d44ce4%40hemmecke.org.