numpy.logaddexp2(x1, x2[, out])

Base-2 Logarithm of 2**x + 2**y.

This function is useful in machine learning when the calculated probabilities of events may be so small as to excede the range of normal floating point numbers. In such cases the base-2 logarithm of the calculated probability can be used instead. This function allows adding probabilities stored in such a fashion.


x : array_like

Input values.

y : array_like

Input values.


result : ndarray

Base-2 logarithm of 2**x + 2**y.

See also


This Page

Quick search