  We call a function constructible if it has a globally subanalytic domain and
can be expressed as a sum of products of globally subanalytic functions and
logarithms of positively-valued globally subanalytic functions. For any $q > 0$
and constructible functions $f$ and $\mu$ on $E\times\RR^n$, we prove a theorem
describing the structure of the set of all $(x,p)$ in $E \times (0,\infty]$ for
which $y \mapsto f(x,y)$ is in $L^p(|\mu|_{x}^{q})$, where $|\mu|_{x}^{q}$ is
the positive measure on $\RR^n$ whose Radon-Nikodym derivative with respect to
the Lebesgue measure is $y\mapsto |\mu(x,y)|^q$. We also prove a closely
related preparation theorem for $f$ and $\mu$. These results relate analysis
(the study of $L^p$-spaces) with geometry (the study of zero loci).
