|
-
Nov 19th, 2007, 04:02 PM
#1
Thread Starter
Hyperactive Member
[2.0] what is equivalent to an Exponential function in C#
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
-
Nov 19th, 2007, 04:11 PM
#2
Re: [2.0] what is equivalent to an Exponential function in C#
You'd use Math.Pow() for that.
C# Code:
Math.Pow(1 - (1 - CPR), (1 / 12))
-
Nov 19th, 2007, 04:13 PM
#3
Re: [2.0] what is equivalent to an Exponential function in C#
You're welcome for pointing you to this thread...
Oh, and thanks. I was curious about this too.
-
Nov 19th, 2007, 05:30 PM
#4
Re: [2.0] what is equivalent to an Exponential function in C#
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.
-
Nov 19th, 2007, 05:32 PM
#5
Re: [2.0] what is equivalent to an Exponential function in C#
The documentation for the Math.Exp method even says:
 Originally Posted by MSDN
Use the Pow method to calculate powers of other bases.
Exp is the inverse of Log.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|