Let $m\ge 0$, let $M$ be a closed oriented smooth manifold of dimension $2m$, let $g$ be a Riemannian metric on $M$, and let $d\operatorname{vol}_g$ be the Riemannian volume measure determined by $g$ and the orientation; in dimension $0$, this is the positive counting measure on the finite set $M$. Let $\nabla^{LC}$ be the Levi-Civita connection on the oriented Euclidean vector bundle $(TM,g)$, and write $F_{\nabla^{LC}}\in\Omega^2(M;\mathfrak{so}(TM,g))$ for its curvature. With the Pfaffian normalized so that the Euler form of an oriented rank-$2m$ Euclidean vector bundle with compatible connection $\nabla$ is $\operatorname{Pf}(F_\nabla/2\pi)$, define the smooth function $\mathcal E_g:M\to\mathbb R$ by the identity