diff options
| author | Thomas Guillermo Albers Raviola <thomas@thomaslabs.org> | 2026-07-30 19:12:55 +0200 |
|---|---|---|
| committer | Thomas Guillermo Albers Raviola <thomas@thomaslabs.org> | 2026-07-30 19:12:55 +0200 |
| commit | 76ae7694728ba01724382c52d6edd7d6b7833850 (patch) | |
| tree | a0c0fb3671a3f7873e55fc8c351fe80ea7d6abaf | |
| parent | 979bcda06f44fb2c92aca36b2f3c41943bf189ea (diff) | |
Add split_exponent
| -rw-r--r-- | series.mac | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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( |
