diff --git a/pystencils/sympyextensions.py b/pystencils/sympyextensions.py index 7d25f49c799f35cd4960c5640d09dccfe5e6416e..f788dbcd89850503e3116598e48b359b037eebb7 100644 --- a/pystencils/sympyextensions.py +++ b/pystencils/sympyextensions.py @@ -503,7 +503,7 @@ def count_operations(term: Union[sp.Expr, List[sp.Expr]], result['fast_div'] += 1 elif t.func is sp.Pow: if check_type(t.args[0]): - visit_children = False + visit_children = True if t.exp.is_integer and t.exp.is_number: if t.exp >= 0: result['muls'] += int(t.exp) - 1