# usencrypt.log#

usencrypt.log(x, n=23, debug=False)#

Computes the natural logarithm of $$x$$ using the Newton-Raphson method.

Parameters
• x (usencrypt.cipher.Float or float) – The input value.

• n (int) – The number of iterations for the Newton-Raphson method. Defaults to 23.

Returns

The natural logarithm of x.

Return type

usencrypt.cipher.Float or float

Note

• It takes 23 iterations of Newton-Raphson to converge in range that does not cause overflow.

• Depends on the usencrypt.exp() function.

Warning

Overflow occurs around the range of $$x = 60$$ due to exponentiation occurring in the Newton-Raphson process.

>>> import usencrypt as ue