savage icon indicating copy to clipboard operation
savage copied to clipboard

Variable substitution should be performed only once, not on each evaluation step

Open p-e-w opened this issue 2 years ago • 0 comments

The current implementation can cause infinite loops and infinite recursion, for example with this input:

f(x) = x
f(x)

The problem here is that the substituted expression is itself a variable with the same identifier as the variable it is substituted for, so substitution continues forever.

p-e-w avatar Apr 04 '22 06:04 p-e-w