[system] / trunk / pg / macros / parserFormulaUpToConstant.pl Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

Diff of /trunk/pg/macros/parserFormulaUpToConstant.pl

Revision 5393 Revision 5395
13 # they want, and it doesn't have to be the one the professor used. 13 # they want, and it doesn't have to be the one the professor used.
14 # 14 #
15 # To use FormulaWithConstat objects, load this macro file at the 15 # To use FormulaWithConstat objects, load this macro file at the
16 # top of your problem: 16 # top of your problem:
17 # 17 #
19 # 19 #
20 # then create a formula with constant as follows: 20 # then create a formula with constant as follows:
21 # 21 #
22 # \$f = FormulaUpToConstant("sin(x)+C"); 22 # \$f = FormulaUpToConstant("sin(x)+C");
23 # 23 #
62 # 62 #
63 # \$f = FormulaUpToConstant("sin(x)+C"); 63 # \$f = FormulaUpToConstant("sin(x)+C");
64 # \$g = Formula("cos(x)"); 64 # \$g = Formula("cos(x)");
65 # \$h = \$f->removeConstant + \$g; # \$h will be "sin(x)+cos(x)" 65 # \$h = \$f->removeConstant + \$g; # \$h will be "sin(x)+cos(x)"
66 # \$h = FormulaUpToConstant(\$h); # \$h will be "sin(x)+cos(x)+C" 66 # \$h = FormulaUpToConstant(\$h); # \$h will be "sin(x)+cos(x)+C"
67 #
69 # to the student when the "+ C" is left out. You can turn off
70 # these messages using the showHints option to the cmp() method:
71 #
72 # ANS(\$f->cmp(showHints => 0));
67 # 73 #
68 ###################################################################### 74 ######################################################################
69 75
70=cut 76=cut
71 77

Legend:
 Removed from v.5393 changed lines Added in v.5395