log
Find the logarithm of argument x with the base of a
will return the logarithm of the argument x with the base a, both given as arguments. The return_type specifies in which data type the result will be returned in, like shown in below example:
Just like ln(x), log(a, x) isn't defined for all non-positive arguments x, as the compiler will throw an exception:
Because the ln(x) function is so precise, we can just use the:
formula to calculate the given logarithm.
Last updated