The thermodynamic formalism for ''multifractal'' functions phi(x) is a
heuristic principle that states that the singularity spectrum f(alpha
) (defined as the Hausdorff dimension of the set S(alpha) of points wh
ere phi has Holder exponent alpha) and the moment scaling exponent tau
(q) (giving the power law behavior of integral\phi(x + t) - phi(x)\q d
x for small \t\) should be related by the Legendre transform, tau(q) =
1 + inf/alpha greater-than-or-equal-to 0 [qalpha - f(alpha)]. The ran
ge of validity of this heuristic principle is unknown. Here this princ
iple is rigorously verified for a family of ''toy examples'' that are
solutions of refinement equations. These example functions exhibit osc
illations on all scales, and correspond to multifractal signed measure
s rather than multifractal measures; moreover, their singularity spect
ra f(alpha) are not concave.