# What numbers can be created by 1−x21-x^2 and x/2x/2?

Suppose I have two functions

and the number $1$. If I am allowed to compose these functions as many times as I like and in any order, what numbers can I get to if I must take $1$ as the input? For example, I can obtain $15/16$ by using

It is obvious that all obtainable numbers are in the set $\mathbb Q\cap [0,1]$, but some numbers in this set are not obtainable, like $5/8$ (which can be easily verified).

Can someone identify a set of all obtainable numbers, or at least a better restriction than $\mathbb Q\cap[0,1]$? Or, perhaps, a very general class of numbers which are obtainable?

Here’s a sorted plot of all distinct values of compositions of up to 22 elementary functions f and g:

Mathematica code:

f[x_] := 1 - x^2;
g[x_] := x/2;
DeleteDuplicates[
Sort[
(Apply[Composition, #][x] /. x -> 1/2) & /@
Flatten[Table[Tuples[{f, g}, i], {i, 22}], 1]]]

ListPlot[%]


This graph confirms the obvious fact that the value can never be greater than $1$ and that there is a gap between $1/2$ and $3/4$.