Working solution for e^x