WeBWorK Main Forum

Formatting numbers -- using commas as thousands-separator

Re: Formatting numbers -- using commas as thousands-separator

by Alex Jordan -
Number of replies: 3

Yes, there is this:

https://webwork.maa.org/wiki/EquationEvaluators

Some care/awareness is needed to use this. It works by choosing random (x,y) values (or however many variables are in the context) and using a kind of Newton's method to converge toward tuples that solve the equation. And it sees if the same convergence happens for the student answer. There are kinds of equations where that just won't work. See the details in the commentary at:

https://github.com/openwebwork/pg/blob/master/macros/parserImplicitEquation.pl


In reply to Alex Jordan

Re: Formatting numbers -- using commas as thousands-separator

by Gabor Lukacs -
Thank you Alex for suggestion the EquationEvaluators / ImplicitEquation. It one seems to be checking equality on the basis of testing values, though.

I was looking at for something that is more based on formal algebra. A step forward from reducing algebraic expressions.
In reply to Gabor Lukacs

Re: Formatting numbers -- using commas as thousands-separator

by Alex Jordan -

Hi Gabor,

Since WeBWorK does not have a CAS, it doesn't have what I think you are describing.

You can have a WeBWorK problem appeal to Sage for certain things. Try leveraging what is here:

https://webwork.maa.org/wiki/AskSage

It has been a long time since I tried to use this. IIRC, occasionally you will have to be careful with the syntax that PG understands versus the syntax that Sage understands. And it sounds like you may be interested in using AskSage within a custom answer checker, not just using it to produce something to present in the exercise statement.

Alex