Permalink
Browse files

Minor changes to compile with R14B01 compiler

  • Loading branch information...
slfritchie committed Jan 28, 2011
1 parent fb52c00 commit 4610e4c239bfb7a152e5bce27e4e6cc864425120
Showing with 9 additions and 9 deletions.
  1. +1 −1 src/stats_rv.erl
  2. +8 −8 src/stats_sample.erl
View
@@ -66,5 +66,5 @@ normal(Mean, Sigma) ->
poisson_rv_loop(Lambda, Sum, N) when Sum < Lambda ->
poisson_rv_loop(Lambda, Sum - math:log(random:uniform()), N+1);
-poisson_rv_loop(Lambda, Sum, N) ->
+poisson_rv_loop(_Lambda, _Sum, N) ->
N.
View
@@ -47,8 +47,8 @@ new() ->
update(Value, State) ->
State#state {
n = State#state.n + 1,
- min = min(Value, State#state.min),
- max = max(Value, State#state.max),
+ min = nan_min(Value, State#state.min),
+ max = nan_max(Value, State#state.max),
sum = State#state.sum + Value,
sum2= State#state.sum2 + (Value * Value)}.
@@ -94,13 +94,13 @@ summary(State) ->
%% Internal functions
%% ===================================================================
-min(V1, 'NaN') -> V1;
-min('NaN', V1) -> V1;
-min(V1, V2) -> erlang:min(V1, V2).
+nan_min(V1, 'NaN') -> V1;
+nan_min('NaN', V1) -> V1;
+nan_min(V1, V2) -> erlang:min(V1, V2).
-max(V1, 'NaN') -> V1;
-max('NaN', V1) -> V1;
-max(V1, V2) -> erlang:max(V1, V2).
+nan_max(V1, 'NaN') -> V1;
+nan_max('NaN', V1) -> V1;
+nan_max(V1, V2) -> erlang:max(V1, V2).
%% ===================================================================

0 comments on commit 4610e4c

Please sign in to comment.