We have been looking online (without success) for a list of mathematical functions for use in WeBWorK by problem authors. That is, we aren't looking for sine, cosine, log, etc. as used by the students to input answers. We're looking for functions like "round" that can be used when creating problems.

(We know there's a rounding function because we guessed that there should be and tried it, but presumably there's a better way than guessing!)

Can anyone point me in the direction of such a list?

### Mathematical functions for problem authoring

by Sean Fitzpatrick -
In reply to Sean Fitzpatrick
Friday, 14 July 2017, 4:55 PM

### Re: Mathematical functions for problem authoring

by Michael Gage -
You can decipher many of the functions available by looking at

Anything of the form

sub xxxxx {

$a = shift

$b = shift

}

creates a function xxxxx(a, b) which you can use.

or

sub xxxxx {

... $_[0], $_[1], $_[2]

.....

}

would be a function xxxxx(a,b,c) with three arguments.

The POD documentation in this file is not correctly written. If it were

you would be able to use the PGauxiliaryFunctions.pl link and description

on the page

http://webwork.maa.org/pod/pg_TRUNK/ to answer you question.

Perhaps someone learning to write PG and perl would be willing to fix the POD documentation and submit a pull request to github.com/openwebwork so that it is easier to find the answer to your question. It would be a good learning project.

-- Mike

In reply to Michael Gage
Monday, 17 July 2017, 11:34 AM

### Re: Mathematical functions for problem authoring

by Sean Fitzpatrick -
Perfect, thank you.

I'll pass this along, and see if we have time to look at that documentation.