Skip to content

Commit df9483f

Browse files
authored
Merge pull request #917 from lahvak/movebizarro
Move bizarro arithmetics settings
2 parents 8305b87 + b9625a7 commit df9483f

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

OpenProblemLibrary/CollegeOfIdaho/setAlgebra_06_02_AddSubRationalExpressions/62IntAlg_19_AddSubRatExp.pg

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,6 @@ TEXT(beginproblem());
3333

3434
Context("Numeric");
3535

36-
Context()->operators->set(
37-
'/' => {class => 'bizarro::BOP::divide', isCommand => 1},
38-
'/ ' => {class => 'bizarro::BOP::divide', isCommand => 1},
39-
' /' => {class => 'bizarro::BOP::divide', isCommand => 1},
40-
'//' => {class => 'bizarro::BOP::divide', isCommand => 1},
41-
'*' => {class => 'bizarro::BOP::multiply', isCommand => 1},
42-
'* ' => {class => 'bizarro::BOP::multiply', isCommand => 1},
43-
' *' => {class => 'bizarro::BOP::multiply', isCommand => 1},
44-
'+' => {class => 'bizarro::BOP::add', isCommand => 1},
45-
'+ ' => {class => 'bizarro::BOP::add', isCommand => 1},
46-
' +' => {class => 'bizarro::BOP::add', isCommand => 1},);
47-
4836
# --- Form: a/(y+b) + c/(y+d) -------------------------------------
4937
# Note: b neq d, and (ad+cb)/(a+c) neq b nor d
5038
# Answer: ((a+c)y+(ad+cb))/(y+b)(y+d)
@@ -64,6 +52,16 @@ $den2 = Formula("y + $d")->reduce;
6452
$f2 = Formula("($c) / $den2")->reduce->TeX;
6553

6654
# --- For the Solution----------------------------------
55+
Context()->operators->set(
56+
'/' => {class => 'bizarro::BOP::divide', isCommand => 1},
57+
'/ ' => {class => 'bizarro::BOP::divide', isCommand => 1},
58+
' /' => {class => 'bizarro::BOP::divide', isCommand => 1},
59+
'//' => {class => 'bizarro::BOP::divide', isCommand => 1},
60+
'*' => {class => 'bizarro::BOP::multiply', isCommand => 1},
61+
'* ' => {class => 'bizarro::BOP::multiply', isCommand => 1},
62+
' *' => {class => 'bizarro::BOP::multiply', isCommand => 1},
63+
'+' => {class => 'bizarro::BOP::add', isCommand => 1},
64+
6765
$lcd = Formula("(y+$b)(y+$d)")->reduce;
6866
$mult1 = $den2;
6967
$mult2 = $den1;

0 commit comments

Comments
 (0)