Context Function Categories

From WeBWorK_wiki
Revision as of 06:13, 12 August 2012 by Dpvc (talk | contribs) (Go to specific line in Functions.pm)
Jump to navigation Jump to search

The functions available to be used in student answers are controlled via the functions object of the current Context. See Answer Checkers and the Context for details about how to enable and disable these functions. This can be done either singly or by categories of functions.

The available function categories are the following:

Category Functions Included
SimpleTrig sin, cos, tan, sec, csc, cot
InverseTrig asin, acos, atan, asec, acsc, acot, arcsin, arccos, arctan, arcsec, arccsc, arccot, atan2
SimpleHyperbolic sinh, cosh, tanh, sech, csch, coth
InverseHyperbolic asinh, acosh, atanh, asech, acsch, acoth, arcsinh, arccosh, arctanh, arcsech, arccsch, arccoth
Numeric log, log10, exp, sqrt, abs, int, sgn, ln, logten
Vector norm, unit
Complex arg, mod, Re, Im, conj
Hyperbolic all of SimpleHyperbolic and InverseHyperbolic
Trig all of SimpleTrig, InverseTrig, and Hyperbolic
All all of Trig, Numeric, Vector, and Complex

See pg/lib/Parser/Context/Default.pm for the definitions of all the functions, and pg/lib/Parser/Context/Functions.pm for the code that defines the categories.