I have an expression to calculate and I am confused between Math.Pow() or Math.Exp().
Expression to be calculated:
1-(1-CPR)^(1/12)
where ^ is exponential (works in excel).
thanks
nath
Printable View
I have an expression to calculate and I am confused between Math.Pow() or Math.Exp().
Expression to be calculated:
1-(1-CPR)^(1/12)
where ^ is exponential (works in excel).
thanks
nath
You'd use Math.Pow() for that.
C# Code:
Math.Pow(1 - (1 - CPR), (1 / 12))
You're welcome for pointing you to this thread...
Oh, and thanks. I was curious about this too. :)
The MSDN documentation says:
Math.Pow: Returns a specified number raised to the specified power.
Math.Exp: Returns e raised to the specified power.
The only reason you would be confused is if you didn't read the documentation.
The documentation for the Math.Exp method even says:Quote:
Originally Posted by MSDN