Simplify some generalized math formulas:

Now the 'sin^2+cos^2=1' and the 'sinh^2-cosh^2=-1' code can handle, for example: sin^4+cos^4=1, sinh^10-cosh^10=-1.
Also, the arguments can be also multitokens, so that it's possible to simplify, for example: 'sin^2(k())+cos^2(k())=1'.
Related to the previous commit:

Use bit operator '&' instead of modulo operator '%'.