Let $D\subseteq \mathbb {R}$ be closed and discrete and $f:D^n \to \mathbb {R}$ be such that $f(D^n)$ is somewhere dense. We show that $(\mathbb {R},+,\cdot ,f)$ defines $\mathbb {Z}$. As an application, we get that for every $\alpha ,\beta \in \mathbb {R}_{>0}$ with $\log _{\alpha }(\beta )\notin \mathbb {Q}$, the real field expanded by the two cyclic multiplicative subgroups generated by $\alpha$ and $\beta$ defines $\mathbb {Z}$.