Sure. Use
ANS($f->cmp(upToConstant=>1));to get the equivalent of
mode=>"antidir"
.
There is also a MathObject for formulas-up-to-constants that requires the student to include the constant (and they can pick any constant they want, not just "C"). See the documentation for
pg/macros/parserFormulaUpToConstant.plat
http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/parserFormulaUpToConstant.pl.htmlfor details on how to use it.
Davide
Many thanks. I'm still having trouble finding my way around the documentation, and the upToConstant flag doesn't seem to be mentioned in http://webwork.maa.org/doc/cvs/pg_CURRENT/doc/MathObjects/MathObjectsAnswerCheckers.html. Do you know where it's documented?
Rick.
The MathObjectsAnswerCheckers.html file is a very early document that I wrote when I first developed the MathObjects library, and it hasn't been updated very well as changes have been made. So it is pretty our of date. (It's not actually WRONG, but sadly incomplete.) The documentation situation is pretty poor all around.
It should have been in
http://webwork.maa.org/doc/cvs/pg_CURRENT/lib/Value/AnswerChecker.html
but seems to have been left out (none of the Formula flags are listed). I'm afraid I usually just look at the code when someone asks me what the flags are. :-)
Davide
It should have been in
http://webwork.maa.org/doc/cvs/pg_CURRENT/lib/Value/AnswerChecker.html
but seems to have been left out (none of the Formula flags are listed). I'm afraid I usually just look at the code when someone asks me what the flags are. :-)
Davide