Let $$f:\mathbb{R}\to \mathbb{R} : f(x)=\begin{cases} a^x & \text{if $x \in \mathbb{Q}$} \\ \sup\{ f(y):y<x \text{ and }y \in \mathbb{Q} \} & \text{if $x \in \mathbb{R} \setminus \mathbb{Q}$}\end{cases}$$ where $a>0$.
Prove that $f$ is continuous on $\mathbb{R}$.
Hint: Use $f(x+y)=f(x)f(y)$ for $x,y\in\Bbb Q$ and $f(x)\approx 1$ for $0\approx x\in\Bbb Q$.