Skip to content
Permalink
Browse files
Merge remote-tracking branch 'upstream/master'
  • Loading branch information
kxepal committed Oct 28, 2015
2 parents 3790938 + 1c7f37c commit 008f48aff819126e281d5ccae80a258bf9bf9c30
Showing 2 changed files with 4 additions and 3 deletions.
@@ -4,5 +4,6 @@
{vsn, git},
{registered, []},
{applications, []},
{env, []}
{env, []},
{modules, []}
]}.
@@ -39,7 +39,6 @@
-record(scan_result, {n=0, sumX=0, sumXX=0, sumInv=0, sumLog, max, min}).
-record(scan_result2, {x2=0, x3=0, x4=0}).

-compile([native]).

get_statistics([_,_,_,_,_|_] = Values) ->
Scan_res = scan_values(Values),
@@ -208,7 +207,8 @@ arithmetic_mean(#scan_result{n=N, sumX=Sum}) ->
geometric_mean(#scan_result{n=N, sumLog=SumLog}) ->
math:exp(SumLog/N).

harmonic_mean(#scan_result{sumInv=0}) ->
harmonic_mean(#scan_result{sumInv=Zero}) when Zero =:= 0 orelse
Zero =:= 0.0 ->
%% Protect against divide by 0 if we have all 0 values
0;
harmonic_mean(#scan_result{n=N, sumInv=Sum}) ->

0 comments on commit 008f48a

Please sign in to comment.