The Math.log() function returns the natural logarithm (base e) of a number. So you can use Math.log(a)/Math.log(b) to get the result of logarithmic calculation.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Participant
1320 Points
491 Posts
Re: How to solve this logarithm code?
Feb 11, 2020 04:44 AM|jiadongm|LINK
Hi Omanxp,
The Math.log() function returns the natural logarithm (base e) of a number. So you can use Math.log(a)/Math.log(b) to get the result of logarithmic calculation.
For more details, refer to this link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log
Best Regards,
Jiadong Meng