updated e and pi templates (allow arbitrary index type); updated trigonometrics templates (most of it is now constexpr)