Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
cetlib
cetlib
test
pow_constexpr_test.cc
Go to the documentation of this file.
1
#include "
cetlib/pow.h
"
2
3
int
4
main
()
5
{
6
static_assert(cet::pow<2>(3) == 9);
7
static_assert(cet::pow<3>(2) == 8);
8
static_assert(cet::pow<2>(0.5) == 0.25);
9
static_assert(cet::pow<1>(0.0
f
) == 0.0);
10
11
static_assert(
cet::diff_of_squares
(13, 12) == 25);
12
static_assert(
cet::diff_of_squares
(13u, 12u) == 25u);
13
static_assert(
cet::diff_of_squares
(13L, 12L) == 25L);
14
static_assert(
cet::diff_of_squares
(13., 12.) == 25.);
15
16
static_assert(
cet::sum_of_squares
(13, 12) == 313);
17
static_assert(
cet::sum_of_squares
(13u, 12u) == 313u);
18
static_assert(
cet::sum_of_squares
(13L, 12L) == 313L);
19
static_assert(
cet::sum_of_squares
(13., 12.) == 313.);
20
}
main
int main()
Definition:
pow_constexpr_test.cc:4
keras_to_tensorflow.f
f
Definition:
keras_to_tensorflow.py:162
cet::diff_of_squares
constexpr T diff_of_squares(T x, T y)
Definition:
pow.h:132
cet::sum_of_squares
constexpr T sum_of_squares(T x, T y)
Definition:
pow.h:139
pow.h
Generated by
1.8.11