[ww-bugs] Bug 3543: New: a correct (num,den) answer is rejected
bugzilla-daemon at webwork.maa.org
bugzilla-daemon at webwork.maa.org
Thu Dec 3 00:41:50 EST 2015
http://bugs.webwork.maa.org/show_bug.cgi?id=3543
Summary: a correct (num,den) answer is rejected
Product: Problem libraries
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: normal
Priority: P5
Component: Library (OPL)
AssignedTo: jj at asu.edu
ReportedBy: Dick.Lane at umontana.edu
Web browser ---
version:
LoyolaChicago/Precalc/Chap9Tools/Connally3-9-Tools-14.pg
With seed 2741, the task is to compute
10/(x-3) + 3/(6x-18)
and present the answer in reduced form.
As programmed, 63/(6x-18) is required while 21/(2x-6) is rejected but with
messages "Simplify your answer further" [sic?!?]
Since Paul's custom answer checker diagnoses some errors [and has the
misdiagnosis noted above], I defer to him for a way to fix this incorrect
checking.
On the other hand, my choice would be to prevent this situation from arising.
Replacing
$d = random(2,8,2);
with
do {$d = random(2,8,2)} until (gcd($d,$b) == 1) ;
or
do {$d = random(2,8,1)} until (gcd($d,$b) == 1) ;
might be sufficient.
Another alternative would be to explicitly reduce the naive $num/$den answer
after its pieces are computed by
$num = Formula("$d * $a + $b")->reduce;
$den = Formula("$d x - $cd")->reduce;
E.g., compute $g = gcd($num,$d); and do subsequent arithmetic to get reduced
rational answer and then also show that work in the problem's Solution.
--
Configure bugmail: http://bugs.webwork.maa.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the webwork-bugs
mailing list