WeBWorK Problems

Error entering exact trig function value

Re: Error entering exact trig function value

by Davide Cervone -
Number of replies: 0
Yes, pi in your PG problem will produce a MathObject Real (just as i will produce a MathObject Complex or MathObject Vector, depending on the context). It is not part of native perl.

Just to be clear, Compute() does check if its argument is already a MathObject, and returns (a copy of) the object in that case (it will not be reprised, and so doesn't need to follow the context rules, which only apply to parsing a string). For everything else, it is essentially treated as a string and parsed by the context rules.