e^x should only be defined for scalar x; element-wise exponentiation should require .^