anchor.diff:      %%
       %% Verify that the basic statistics are ok
       %% be gentle we don't want to see to many failing tests
  -    abs(StandardMean) < 0.005 orelse ct:fail({average, Alg, StandardMean}),
  -    abs(StandardStdDev - 1.0) < 0.005 orelse ct:fail({stddev, Alg, StandardStdDev}),
  -    ok.
  +    if
  +        abs(StandardMean) < 0.005 -> [];
  +        true ->
  +            [{average, Alg, StandardMean, IntendedMean, IntendedVariance}]
  +    end ++
  +        if
  +            abs(StandardStdDev - 1.0) < 0.005 -> [];
  +            true ->
  +                [{stddev, Alg, StandardStdDev, IntendedMean, IntendedVariance}]
  +        end.
   
   normal_s(Mean, Variance, State0) when Mean == 0, Variance == 1 ->
       % Make sure we're also testing the standard normal interface
  
positive.code:     StandardX = (X - IntendedMean) / math:sqrt(IntendedVariance),
      basic_normal_1(N-1, IntendedMean, IntendedVariance, S,
                     StandardX+StandardSum, StandardX*StandardX+StandardSq);
  basic_normal_1(0, _IntendedMean, _IntendedVariance, {#{type:=Alg}, _}, StandardSum, StandardSumSq) ->
      StandardMean = StandardSum / ?LOOP,
      StandardVariance = (StandardSumSq - (StandardSum*StandardSum/?LOOP))/(?LOOP - 1),
      StandardStdDev =  math:sqrt(StandardVariance),
  
negative.code:         [{Mean, Variance} || Mean <- IntendedMeans,
                               Variance <- IntendedVariances],
  
      %% valgrind needs a lot of time
      ct:timetrap({minutes, 6 * length(IntendedMeanVariancePairs)}),
      Result =
          lists:filter(
            fun (R) -> R =/= [] end,
            [begin
                 ct:pal(
                   "Testing normal(~.2f, ~.2f)~n",
                   [float(IntendedMean), float(IntendedVariance)]),
                 lists:filter(
                   fun (R) -> R =/= [] end,
                   [basic_normal_1(?LOOP, IntendedMean, IntendedVariance,
                                   rand:seed_s(Alg), 0, 0)
                    || Alg <- [default|algs()]])
             end || {IntendedMean, IntendedVariance}
                        <- IntendedMeanVariancePairs]),
      Result =:= [] orelse
          ct:fail(Result),
      ok.
  
  basic_uniform_1(Alg, Loop, Buckets) ->
      basic_uniform_1(
        0, Loop, Buckets, rand:seed_s(Alg), 0.0,
        array:new(Buckets, [{default, 0}])).
  %%
  basic_uniform_1(N, Loop, Buckets, S0, Sum, A0) when N < Loop ->
      {X,S} =
          case N band 1 of
              0 ->
  