Exponential Math operation

To add comments, please log in or register
Daniel Arges
202
Daniel Arges  

Hi coders,

Does anybody have an example to use exponential calculation in MQL5?

I need to calculate a i (return tax) by a specific time. Let's say, I need to perfor this calculation: (FV/PV)ˆ(1/n)-1

I couldn't apply properly MathExp(), or exp().


Thanks

Fernando Carreiro
4297
Fernando Carreiro  
Daniel Arges: Does anybody have an example to use exponential calculation in MQL5?

I need to calculate a i (return tax) by a specific time. Let's say, I need to perfor this calculation: (FV/PV)ˆ(1/n)-1

I couldn't apply properly MathExp(), or exp().

double result = pow( FV / PV, 1.0 / n ) - 1.0;

Use MathPow() or pow()!

MathExp() or exp() is for the Exponential function for Euler's Number ( "e^x", where e = 2.7182818284590452353602874713527 ).

To add comments, please log in or register