WeBWorK Problems

Display of student input with significant figures

Re: Display of student input with significant figures

by Steven Fiedler -
Number of replies: 0
This was a fairly straightforward task but it required some attention. There were two translation issues, both of which were kindly resolved on the forum: 
  * backslashes should be converted to two sequential tildes (link) even in regular expressions
  * the $1 terms needed to be replaced in the subroutines (link)

I found it helpful to first focus on the _Simplify subroutine as it possessed no dependencies, followed by CountSigFigs, and so on.  At each point, values were checked by calling the desired routine from the text block and then rendering the problem.