Fundimental flaw in the order of operations that $calc uses.

When a negative interger is raised to a power without being enclosed in paranthasies, order of operations state that the exponent is calculated first and THEN the negative sign is applied.

$calc(-(2^2)) == -4
$calc((-2)^2) == 4
$calc(-2^2) == 4

The order of operations in -2^2 should be equivilent to -(2^2) and NOT (-2)^2.

Enjoy! smile


Well. At least I won lunch.
Good philosophy, see good in bad, I like!