Skip to main content

logaddexp2

Function logaddexp2 

Source
pub fn logaddexp2<T: LogAddExpArg>(x: T, y: T) -> T
Expand description

$\log_2(2^x + 2^y)$

This function is useful in machine learning when the calculated probabilities of events may be so small as to exceed 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.

ยงSee also