Print small integer powers as divisions/multiplications
- Sep 28, 2023
-
-
Daniel Bauer authored4bf8f170
-
Daniel Bauer authoredfc5b8289
-
Daniel Bauer authored08c7e7e8
-
Daniel Bauer authored884cfd84
-
Fixes #72 (closed).
After a longer discussion we decided to reintroduce the special logic into the printer after it was removed in 939241f2. The problem is that it is simply impossible to keep Muls unevaluated in cut_loops. Neither deep_copy nor func(*args) works.
A logic-free printer simply goes against how SymPy works. We can have it, but first we must switch to a SymPy free ast datastructure.