show/hide this revision's text 2 edited tags
show/hide this revision's text 1

Function with range equal to whole reals on every open set

There is an example of a function that is unbounded on every open set. Just take $f(n/m) = m$ for coprime $n$ and $m$ and $f(irrational) = 0$.

I want to generalize this in a way to get a function which is not just unbounded on every open set, but whose range is equal to $\mathbb{R}$ on every open set. The latter construction clearly doesn't work.

I'm interested whether such function exists and if it exists is there any constructive way to define it?