Languages
[Edit]
EN

C# / .NET - Math.Log() method example

0 points
Created by:
Mohammad-Oneal
327

The Math.Log() method returns the natural logarithm (base e) of a number. 

The Math.Log() method is presented on the following chart:

Math.Log(x) function visualization - C# Math Object.
Math.Log(x) function visualization - C# Math Object.

1. Documentation

Edit
Syntax
Parameters

a, d - double value in the range 0 to +Infinitive (primitive value).

newBase - logarithm base.

Result

number value calculated as ln(x) mathematical function (primitive value).

If x is negative it returns NaN.

If x is equal to 0 it returns -Infinity.

If x is equal to +Infinity it returns -Infinity.

Description

Log is a static method that takes one parameter and returns an approximation of the ln(x) function (natural logarithm function - logarithm with base e).

2. Logarithm with custom base example

Edit

This example shows a logarithmic function calculation with its own base.

References

Edit
  1. Natural logarithm - Wikipedia

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Cross technology - Math.log()

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join