$bis a Real, and when
$bis inserted into a string (like the text of the hint), it's value is inserted. The original string is saved to be used as the correct answer string, but that is the only place the original string is used.
Alex suggests setting
Computeto get the effect you want. That is a good suggestion provided you are not using
$bas an answer that the student must enter. If you make
$ba formula, then
ANS($b->cmp)will make an answer checker that expects the student to enter a formula (not a number) and will produce error messages to that effect, which could be misleading.
There are two solutions to this. Either use
ANS($b->eval->cmp)if you use
$bas an answer, or use
instead (along with the
Hope that helps.