The question is
$h:\mathbb{R}\backslash\mathbb{Q}\rightarrow\ \mathbb{Q}$ so that the image of $h$ is the same as the codomain of $h$.
I couldn't really think of a function that maps irrational numbers to rational numbers. Can anyone give me some hints?
$h(x)=r$ if $x=\sqrt2+r$ for some $r\in\mathbb Q$, and $h(x)=0$ else.