At https://youtu.be/i9GMuk0gffM?t=22m31s the author needed to approximate $tanh(x)$ using rational functions and absolute values. He constructed $\frac{x+2x^3}{1+|x+2x^3|}$ which was better than Padé (2,2)-approximation. The Padé approximation doesn't have the correct asymptote.
I felt amused by the approximation and thought about how to generalize this kind of approximation. I found no generalization so far. What would be the generalization of this kind of approximation?