summaryrefslogtreecommitdiff
path: root/series.mac
diff options
context:
space:
mode:
Diffstat (limited to 'series.mac')
-rw-r--r--series.mac7
1 files changed, 7 insertions, 0 deletions
diff --git a/series.mac b/series.mac
index 581f88c..c542144 100644
--- a/series.mac
+++ b/series.mac
@@ -219,6 +219,13 @@ split_prod(expr, funcs) := block(
return())),
[expr, apply("*", deps_on_funcs)]);
+/* Return a list of factors with length given by exponent */
+split_exponent(x) := (
+ if atom(x) or op(x) # "^" then (
+ [x])
+ else (
+ makelist(part(x, 1), part(x, 2))));
+
/* Substitute functions by their series expansions and apply substitutions in
coeffs */
__expand_term_subst(expr, coeffs) := block(