Does someone know a computationally efficient bijective function $f$ : $\mathbb{R}\rightarrow (y_{0},y_{1})$ ?
Preferably, $(y_{0},y_{1})=(-1,1)$ and $(0,1)$.
Does someone know a computationally efficient bijective function $f$ : $\mathbb{R}\rightarrow (y_{0},y_{1})$ ?
Preferably, $(y_{0},y_{1})=(-1,1)$ and $(0,1)$.
There are so many examples:
The first example is that $f(x)$ is a monotonous function who with limits on infinity converge to the end point.
For instance, $f(x) = a\frac{x}{\sqrt{x^{2k}+1}}+b$ where $k$ is a natural number and $a+b =y_{1}$ and $a-b = y_{0}$.
since $g(x) = \frac{x}{\sqrt{x^{2k}+1}}$ is a injective function over R. It is easy to show that $f(x):\mathbb{R}\rightarrow (y_{0},y_{1})$ is bijective function.
Or $f(x)$ can be $a \tanh(x) + b$, where a and b satisfies same condition stated above.
The second example is:
$f^{-1}(x) $ can be any monotonous function which send all members in $(y_{0},y_{1})$ to $R$, such as $\tan {x}$(as in comment) or $\frac{A}{x-y_0} + \frac{B}{x-y_1}$.