10 #include "cetlib_except/exception.h" 12 #include <type_traits> 16 template <
unsigned N,
class T>
49 template <
unsigned N,
class T,
unsigned = N % 2u>
52 template <
unsigned N,
class T>
55 template <
unsigned N,
class T>
59 struct pow<0u,
T, 0u>;
62 struct pow<1u,
T, 1u>;
65 struct pow<2u,
T, 0u>;
70 template <
unsigned N,
class T>
79 template <
unsigned N,
class T>
85 return pow_half(x * x);
89 template <
unsigned N,
class T>
95 return x * pow_half(x * x);
106 throw cet::exception(
"cet::pow") <<
"pow<0>(0) is indeterminate!";
134 return (x + y) * (x -
y);
constexpr T operator()(T x)
constexpr T diff_of_squares(T x, T y)
constexpr T sum_of_squares(T x, T y)
constexpr T operator()(T x)
constexpr T operator()(T x)
constexpr T operator()(T x)
constexpr T operator()(T x)
cet::coded_exception< error, detail::translate > exception