Closed christianp closed 3 years ago
This is really hard, because of the "part of expression to mark" option. We can only identify the variables to evaluate after finding the matching group. The expression might have to be simplified in order to match the pattern restriction. I suppose it's true that simplifying can't introduce new variable names, and there's no harm in generating unused variables, so maybe this isn't really a problem.
For now, I fixed the part by setting the correctVariables
marking note to a fixed set("x","y","z")
, but I'm not happy about having to do that.
I have a mathematical expression part whose correct answer is something like
{cx}*x + {cy}*y = {cz}*z
. I need to pickz
to satisfy the equation half of the time.When
cy = 0
, they
term is cancelled, so it's not in the list of variables to pick, and the value generator forz
gives an error "`y is not defined." It doesn't matter what value
y` takes, since it'll cancel out, but it needs to be defined. So we should use the unsimplified form of the expected answer to find variable names.