WeBWorK Problems

bizarroArithmetic

bizarroArithmetic

by Andras Balogh -
Number of replies: 1

I don't know if this is related to v2.19 of if this was a bug before.

bizarroAruthmetic is used in CollegeOfIdaho/setAlgebra_06_02_AddSubRationalExpressions/62IntAlg_17_AddSubRatExp.pg

as 


Context()->operators->set(
   '/' => {class => 'bizarro::BOP::divide', isCommand => 1},
   '/ ' => {class => 'bizarro::BOP::divide', isCommand => 1},
   ' /' => {class => 'bizarro::BOP::divide', isCommand => 1},
   '//' => {class => 'bizarro::BOP::divide', isCommand => 1},
   '*' => {class => 'bizarro::BOP::multiply', isCommand => 1},
   '* ' => {class => 'bizarro::BOP::multiply', isCommand => 1},
   ' *' => {class => 'bizarro::BOP::multiply', isCommand => 1},
   '+' => {class => 'bizarro::BOP::add', isCommand => 1},
   '+ ' => {class => 'bizarro::BOP::add', isCommand => 1},
   ' +' => {class => 'bizarro::BOP::add', isCommand => 1},);

As a consequence, the answer

$answer = Formula("($a + $b*$c x)/($b x^2)")->reduce;

does not accept the plus sign unless the space after + is removed in the above line, and even in the solution it shows up as $a $b*$c x  instead of  $a + $b*$c. 

In reply to Andras Balogh

Re: bizarroArithmetic

by Glenn Rice -

Yes, the '+ ' and ' +' operators should not be set.  There are no such operators.  That is not a bug in PG or WeBWorK.  That is a bug in the problem.