From my playground: compute any arithmetic function during compile time with C++ templates, based on the theory of recursive functions.