[LON-CAPA-users] Any way around this?
Gerd Kortemeyer
korte at lite.msu.edu
Tue Aug 21 11:30:43 EDT 2012
Hi,
I would suggest putting the format into the "Format" field of the numerical response.
- Gerd.
On Aug 21, 2012, at 10:54 AM, "Mills, Douglas G" <dmills at illinois.edu> wrote:
> HI All,
>
> I’m finding that if I define a variable as follows:
>
> $CB1=&format(8.000e-6,"4s");
>
> OR
>
> $CB1=&format(8.000e-6,"3e");
>
> And use it as the answer to a numerical problem requiring 4 significant figures, I get the error message that “the computer’s answer is incorrect (‘8e-06’).”
>
> I know (and have tested to confirm) that if I simply change the final zero to a 1 (so 8.001e-6) everything is fine. I had thought the &format command was the key to insisting on the correct number of sig figs in a variable, but I guess hadn’t run into this specific situation before.
>
> Any help from the pros? Thanks,
>
> Doug
>
> Douglas Mills
> Director of Instructional Technologies
> Department of Chemistry
> University of Illinois
> dmills at illinois.edu
> (217) 244-5739
>
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
More information about the LON-CAPA-users
mailing list