Forum archive 2000-2006

Michal Charemza - Answers checked incorrectly with Vector2D and Vector3D variables

Michal Charemza - Answers checked incorrectly with Vector2D and Vector3D variables

by Arnold Pizer -
Number of replies: 0
inactiveTopicAnswers checked incorrectly with Vector2D and Vector3D variables topic started 9/21/2006; 7:30:58 AM
last post 9/21/2006; 6:16:38 PM
userMichal Charemza - Answers checked incorrectly with Vector2D and Vector3D variables  blueArrow
9/21/2006; 7:30:58 AM (reads: 154, responses: 1)
Hi,

I have set up variables 'a' and 'b' that are Vector2D (or Vector3D, the results are the same) variables.

The correct answer to a question is "9*a-2*b-a". If the student enters this exactly, it is marked correct. However, if a student enters "8*a-2*b" it is marked incorrect (which it isn't). If I change the variables to "Real" then the marking works as it should, and marks "8*a-2*b" as correct.

Is there a way to solve this?

Thanks,

Michal.

<| Post or View Comments |>


userDavide P. Cervone - Re: Answers checked incorrectly with Vector2D and Vector3D variables  blueArrow
9/21/2006; 6:16:38 PM (reads: 224, responses: 0)
OK, there was a bug in the formula-checking code for vector-valued formulas. The coordinates of the vectors used for the test points were being created as standard Perl reals rather than Parser Reals, and so the equality checks between the vectors were using Perl's standard exact checks rather than the Parser's fuzzy checks. This caused some points to be marked as unequal due to small differences that should have been ignored.

I have fixed this in pg/lib/Value/Formula.pm so if you get an updated copy of that, you should be OK. Thanks for reporting the problem.

Davide

<| Post or View Comments |>