gistlib
To find the natural logarithm of a number in C#, you can use the Math.Log() method with the base set to Math.E. Here's an example:
main.csdouble x = 10; // the number you want to find the natural logarithm of double result = Math.Log(x); // result will be the natural logarithm of x 145 chars3 lines
double x = 10; // the number you want to find the natural logarithm of double result = Math.Log(x); // result will be the natural logarithm of x
In this example, the value of result will be approximately 2.302585.
result
2.302585
gistlibby LogSnag