##### Differences

This shows you the differences between two versions of the page.

 cs-401r:log-domain-computations [2014/11/03 10:46]ringger [More arguments: logSum()] cs-401r:log-domain-computations [2014/11/03 10:47] (current)ringger [More arguments: logSum()] Both sides previous revision Previous revision 2014/11/03 10:47 ringger [More arguments: logSum()] 2014/11/03 10:46 ringger [More arguments: logSum()] 2014/11/03 10:46 ringger [More arguments: logSum()] 2014/11/03 10:45 ringger [Addition and Subtraction] 2014/11/03 10:45 ringger [Addition and Subtraction] 2014/11/03 10:44 ringger [More arguments: logSum()] 2014/11/03 10:44 ringger [Here's the proof of correctness for step 4] 2014/11/03 10:42 ringger [Addition and Subtraction] 2014/10/25 14:22 ringger 2014/10/25 13:41 cs401rpml created 2014/11/03 10:47 ringger [More arguments: logSum()] 2014/11/03 10:46 ringger [More arguments: logSum()] 2014/11/03 10:46 ringger [More arguments: logSum()] 2014/11/03 10:45 ringger [Addition and Subtraction] 2014/11/03 10:45 ringger [Addition and Subtraction] 2014/11/03 10:44 ringger [More arguments: logSum()] 2014/11/03 10:44 ringger [Here's the proof of correctness for step 4] 2014/11/03 10:42 ringger [Addition and Subtraction] 2014/10/25 14:22 ringger 2014/10/25 13:41 cs401rpml created Line 70: Line 70: double logSum(a list of logarithmic quantities L) double logSum(a list of logarithmic quantities L) - if length(L) == 0 - return –Infinity - if length(L) == 1 - return L[0] - if length(L) == 2 - return logAdd(L[0],​ L[1]) logResult = Double.NEGATIVE_INFINITY logResult = Double.NEGATIVE_INFINITY foreach logX in L: foreach logX in L: