for x = 1: Should be: X + ( ln((1+€)/(1+€) ) / 2€ \* x instead of : X + ( ln((1+€)/(1-€) ) / 2€ \* x