anchor.diff:      _VP = P1E / N + (N - 1) * P1E2 / (2 * N2)
                 + (2*N2 - 3*N + 1) * P1E3 / (6 * N3)
                 + (6*N3 - 11*N2 + 6*N - 1) * P1E4 / (24 * N4)
  -              + (24*N4 - 50*N3 + 35*N2 - 10*N + 1) * P1E5 / (120 * N5). % +O[p^6]
  +              + (24*N4 - 50*N3 + 35*N2 - 10*N + 1) * P1E5 / (120 * N5); % +O[p^6]
  +calc_n_subparts_p1e(N, P1E) when P1E > 0 andalso P1E < 1 ->
  +    _VP = 1 - math:pow(1 - P1E, 1 / N).
   
   %% @doc Splits P1E into N further (equal) independent sub-processes and returns
   %%      the P1E to use for the next of these sub-processes with the previous
  
positive.code: calc_n_subparts_p1e(N, P1E, 1.0) when N == 1 andalso P1E > 0 andalso P1E < 1 ->
      % special case with e.g. no items in the first/previous phase
      P1E;
  calc_n_subparts_p1e(N, P1E, PrevP0E) when P1E > 0 andalso P1E < 1 andalso
                                                PrevP0E > 0 andalso PrevP0E =< 1 ->
      % http://www.wolframalpha.com/input/?i=Taylor+expansion+of+1+-+%28%281+-+p%29%2Fq%29^%281%2Fn%29++at+p+%3D+0
      N2 = N * N, N3 = N2 * N, N4 = N3 * N, N5 = N4 * N,
      P1E2 = P1E * P1E, P1E3 = P1E2* P1E, P1E4 = P1E3 * P1E, P1E5 = P1E4 * P1E,
      Q = math:pow(1 / PrevP0E, 1 / N),
      VP = (1 - Q) + (P1E * Q) / N +
                ((N-1) * P1E2 * Q) / (2 * N2) +
                ((N-1) * (2 * N - 1) * P1E3 * Q) / (6 * N3) +
                ((N-1) * (2 * N - 1) * (3 * N - 1) * P1E4 * Q) / (24 * N4) +
                ((N-1) * (2 * N - 1) * (3 * N - 1) * (4 * N - 1) * P1E5 * Q) / (120 * N5), % +O[p^6]
      if VP > 0 andalso VP < 1 ->
             VP;
         VP =< 0 ->
  
negative.code: calc_signature_size_nm_pair(0, _, P1E, _MaxSize) when P1E > 0 andalso P1E < 1 ->
      0;
  calc_signature_size_nm_pair(N, M, P1E, MaxSize) when P1E > 0 andalso P1E < 1 ->
      P = if P1E < 1.0e-8 ->
                 % BEWARE: we cannot use (1-p1E) since it is near 1 and its floating
                 %         point representation is sub-optimal!
                 % => use Taylor expansion of math:log(1 / (1-P1E))  at P1E = 0
                 %    (small terms first)
                 % http://www.wolframalpha.com/input/?i=Taylor+expansion+of+log%281+%2F+%281-p%29%29++at+p+%3D+0
                 P1E2 = P1E * P1E, P1E3 = P1E2* P1E, P1E4 = P1E3 * P1E, P1E5 = P1E4 * P1E,
                 P1E + P1E2/2 + P1E3/3 + P1E4/4 + P1E5/5; % +O[p^6]
             true ->
                 math:log(1 / (1 - P1E))
          end,
      NT = M + N,
      min_max(util:ceil(util:log2(NT * (NT - 1) / (2 * P))), get_min_hash_bits(), MaxSize).
  
  -spec calc_items_in_chunk(DBChunk::bitstring(), BitsPerItem::non_neg_integer())
  