I am seeking a rational mediant for arcus tangent on $[0,\infty)$. The idea is to find two functions $f\colon \mathbb{R}^2 \to \mathbb{R}$ and $g\colon \mathbb{R}^2 \to \mathbb{R}$, such that:
$$\tan^{-1}(f(a,b)) = g(\tan^{-1}(a),\tan^{-1}(b))$$
Where both $f$ and $g$ are mediants, i.e. $a < f(a,b) < b$ for $a < b$ and $x < g(x,y) < y$ for $x < y$. And a further requirement is that $f$ and $g$ are algebraic.