  Energy is now a first-class design constraint along with performance in all
computing settings. Energy predictive modelling based on performance monitoring
counts (PMCs) is the leading method used for prediction of energy consumption
during an application execution. We use a model-theoretic approach to formulate
the assumed properties of existing models in a mathematical form. We extend the
formalism by adding properties, heretofore unconsidered, that account for a
limited form of energy conservation law. The extended formalism defines our
theory of energy of computing. By applying the basic practical implications of
the theory, we improve the prediction accuracy of state-of-the-art energy
models from 31% to 18%. We also demonstrate that use of state-of-the-art
measurement tools for energy optimisation may lead to significant losses of
energy (ranging from 56% to 65% for applications used in experiments) since
they do not take into account the energy conservation properties.
