Add a generalized solution for integer to ordinal function