Fixed a typo in calcExtrema().
Moved exception throwing for negative exponent monomials into Polynomial class (both types).