WeBWorK Problems

SimplifyExponents function

Re: SimplifyExponents function

by Glenn Rice -
Number of replies: 1

In theory yes.  Eventually the macro will be removed.  Probably in 20 or 30 years.

Attached is a version of the problem coded that way that I would do it.

This removes a lot of silly things that were done in that problem.  For instance, there is no point in using an array to store a single variable choice.

The answer is just created simplified to begin with.

The problem is rewritten to use PGML.  All newly written problems should use PGML and not basic PG.

In reply to Glenn Rice

Re: SimplifyExponents function

by roo biki -

Thanks for your snippet -- I was actually trying to come up with my own re-write as well as an exercise.

The array does seem silly, but I think I know why they did it -- the SimplifyExponents function was written for problems where there is more than one variable, each of which has its own exponent.  I think this is also why the exponent is stored in an array.

Anyways thanks again for the help, and I promise I'm using PGML for everything. :)