The ** LOG() function** returns the logarithm of a number to the specific base.

Figure 1 shows the mathematical representation of the `LOG()`

function:

```
LOG(base, number)
```

This function requires two parameters:

- The
`base`

of the (which must be greater than one) is anlogarithm a number *optional parameter*. - A number whose logarithm is to be calculated, it must be greater than zero.

`LOG()`

returns the logarithm of a number to the specific base sent as a parameter.

If the base is omitted, then the

`LOG()`

function calculates the natural logarithm of a number, which is the same as the`LOG()`

function with a base of the mathematical constant.`e`

If the base is less than one, or the

`number`

is less than`zero`

, the function will return`NULL`

.

/*example showing how to use LOG(base, number)*/-- positive number without baseselect LOG(10);-- positive number with baseselect LOG(3,3);-- zero number with baseselect LOG(2,0);-- positive number with base 0select LOG(0,2);

TRENDING TOPICS