Skip to content

Commit 95cffda

Browse files
committed
Fix bug 4676
1 parent 631f5c3 commit 95cffda

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

OpenProblemLibrary/NAU/setActuarial/setExamFM10a.pg

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,36 @@
55
## Institution(NAU)
66
## Author(Michael Ratliff)
77
## Level(4)
8+
## MO(1)
89
## KEYWORDS('force of interest')
910
##ENDDESCRIPTION
1011

1112
DOCUMENT();
1213

1314
loadMacros(
1415
"PGstandard.pl",
15-
"PGchoicemacros.pl",
16+
"MathObjects.pl",
1617
"PGasu.pl",
1718
"PGcourse.pl"
1819
);
1920

20-
TEXT(&beginproblem);
21+
TEXT(beginproblem());
2122

23+
Context("Numeric");
2224
$e = random(2,8,2);
2325
$y=random(2008,2016,1);
2426
$n=$y-2004;
2527

26-
TEXT(EV2(<<EOT));
27-
28-
On January 1, 2004, Sam invests $DOLLAR 1000 in a fund for which the force of interest at time t is expressed by \(\delta_t =(0.1)(t-1)^{$e}\),
29-
where t is the number of years since January 1, 2004. Calculate the accumulated value of the fund on January 1, $y.
28+
Context()->texStrings;
29+
BEGIN_TEXT
30+
On January 1, 2004, Sam invests ${DOLLAR}1000 in a fund for which the force of interest at time \(t\) is expressed by \(\delta_t =(0.01)(t-1)^{$e}\),
31+
where \(t\) is the number of years since January 1, 2004. Calculate the accumulated value of the fund on January 1, $y.
3032
$BR
3133
\(\delta_t = \) \{ans_rule(20)\}
32-
EOT
33-
$ans = 100/($e+1)*(($n-1)**($e+1)+1);
34+
END_TEXT
35+
Context()->normalStrings;
3436

35-
&ANS(num_cmp($ans));
37+
$ans = Real( 1000*exp( 0.01/($e+1)*(($n-1)**($e+1)+1) ) );
38+
ANS($ans->cmp());
3639

3740
ENDDOCUMENT();

0 commit comments

Comments
 (0)