A 'match choices with answers' part with 6 marks available will only ever get the 'partially correct' feedback message, because the floating point representation of 1/6 is slightly lower than 1/6.
Should credit be considered as a rational number? I can't see a reason for irrational amounts of credit. We could run Numbas.math.rationalApproximation on amounts of credit, and store the credit as a rational number. This would mean we can still use floats to specify amounts of credit to award, but don't lose accuracy.
This applies to gapfills, too: if there are 6 gaps, each worth 1 mark, the credit from each one will contribute 1/6 of the credit available for the parent.
A 'match choices with answers' part with 6 marks available will only ever get the 'partially correct' feedback message, because the floating point representation of 1/6 is slightly lower than 1/6.
Should credit be considered as a rational number? I can't see a reason for irrational amounts of credit. We could run
Numbas.math.rationalApproximation
on amounts of credit, and store the credit as a rational number. This would mean we can still use floats to specify amounts of credit to award, but don't lose accuracy.