Update ExponentialFunction.java

Used only loops to perform calculation. Results are still incorrect.