[ww-bugs] Bug 3600: error in FormulaUpToConstant when reading Context -- was "can't generate enough points to evaluate"

bugzilla-daemon at webwork.maa.org bugzilla-daemon at webwork.maa.org
Fri Feb 12 14:41:28 EST 2016


http://bugs.webwork.maa.org/show_bug.cgi?id=3600


Mike Gage <gage at math.rochester.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #3 from Mike Gage <gage at math.rochester.edu>  2016-02-12 14:41:27 ---
The complete text is below.  I did put the Context at the top of the file but I
overlooked the second invocation of Context("Numeric") just above the
definition of the answer evaluator.

## DBsubject(Calculus - single variable)
## DBchapter(Techniques of integration)
## DBsection(Trigonometric substitution)
## Institution(UCSB)
## MLT(Trig_simplify)
## MLTleader(1)
## Level(3)
## TitleText1('Calculus: Early Transcendentals')
## AuthorText1('Stewart')
## EditionText1('5')
## Section1('7.3')
## Problem1('26')
## KEYWORDS('trigonometric substitution')

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"parserFormulaUpToConstant.pl",
"PGcourse.pl",
);
Context("Numeric");
Context()->flags->set(limits => [0.2,1]);

TEXT(beginproblem());

$showPartialCorrectAnswers = 1;

$a=random(1,10,1)*random(-1,1,2);
$b=random(1,10,1)*random(-1,1,2);
$c=random(1,10,1)*random(-1,1,2);

Context("Numeric");

$ans =
FormulaUpToConstant("$a*6*asin((x-2)/2)-4*$a*sqrt(4*x-x^2)-(x-2)*$a/2*sqrt(4*x-x^2)+C");

BEGIN_TEXT
Evaluate the integral.
$PAR
\(\displaystyle \int {\frac{$a x^2}{\sqrt{4x-x^2}}}\, dx =\)
\{ans_rule(60)\}
END_TEXT

ANS($ans->cmp());

ENDDOCUMENT();


Removing the second Context() resolved the issue.  

Thanks for the help.

-- 
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