The Maple Digits environment variable controls the number of digits that Maple uses when calculating with software floating-point numbers.
The default value of Digits is 10.
The value of Digits is changed by using the assignment operator. For example, Digits:= 20;
The parameter n, which can be given as a second argument (evalf(expr, n)), sets the value of Digits for a single computation.
To round the exact answer, assign the exact answer to a dummy variable, and then use the evalf(expr,n) command in the evalb command to compare the student response to the rounded answer.
Calculate the quadratic mean of the following list of data: [695, 607, 511, 588, 710, 500, 682, 515, 709, 478, 497, 657, 652, 634, 488, 615, 714, 579, 589, 493, 584, 484, 503, 711, 622, 695]. The answer requires 5 significant digits.
First calculate the exact numeric answer.
Round it to the required number of significant digits. For example (replace a1(), ..., a26() with Maple T.A. variables, say $A, $B, ..., $Z):
exact_answer:=evalf(stats[describe,quadraticmean]([a1(),a2(),a3(),a4(),a5(),a6(),a7(),a8(),a9(),a10(),a11(),a12(),a13(),a14(),a15(),a16(),a17(),a18(),a19(),a20(),a21(),a22(),a23(),a24(),a25(),a26()])):
rounded_answer:=evalf(exact_answer,5):
evalb($RESPONSE,rounded_answer);