  We prove the rationality of the Poincar\'e series of multiplier ideals in any
dimension and thus extending the main results for surfaces of Galindo and
Monserrat and Alberich-Carrami\~nana et al. Our results also hold for
Poincar\'e series of test ideals. In order to do so, we introduce a theory of
Hilbert functions indexed over $\mathbb{R}$ which gives an unified treatment of
both cases.
