anchor.diff:                     [?MODULE, pid_groups:my_groupname(), self(), VP]),
              1.0e-16 % do not go below this so that the opposite probability is possible as a float!
       end;
  -calc_n_subparts_p1e(N, P1E, PrevP0E) when P1E > 0 andalso P1E < 1 andalso
  -                                              PrevP0E > 0 andalso PrevP0E =< 1 ->
  -    VP = 1 - math:pow((1 - P1E) / PrevP0E, 1 / N),
  +calc_n_subparts_p1e(N, P1E, PrevP1E) when P1E > 0 andalso P1E < 1 andalso
  +                                              PrevP1E >= 0 andalso PrevP1E < 1 ->
  +    % TODO: this may also be close to 1 if N is large!
  +    VP = 1 - math:pow((1 - P1E) / (1 - PrevP1E), 1 / N),
       if VP > 0 andalso VP < 1 ->
              VP;
          VP =< 0 ->
  
positive.code:     %       individual trivial syncs' signatures!)
      ThisP1E_upper_bound =
          trivial_worst_case_failprob(SigSize, BucketSize, OtherMaxItemsCount, ExpDelta),
      NextP0E = PrevP0E * (1 - ThisP1E_upper_bound),
  %%     log:pal("merkle_send [ ~p ] (rest: ~B):~n  bits: ~p, P1E: ~p vs. ~p~n  P0E: ~p -> ~p",
  %%             [self(), NumRestLeaves, {SigSize, VSize}, P1E_next, P1E_p1, PrevP0E, NextP0E]),
      {HashesKNew, HashesVNew, ResortedBucket} =
          compress_kv_list(Bucket, {HashesK1, HashesV}, SigSize, VSize,
                           fun trivial_compress_key/2),
      {HashesKNew, HashesVNew, NextP0E, ResortedBucket}.
  
  %% @doc Helper for retrieving a leaf node's KV-List from the compressed binary
  %%      returned by merkle_resolve_add_leaf_hash/9 during merkle sync.
  %% @see merkle_resolve_add_leaf_hash/9
  -spec merkle_resolve_retrieve_leaf_hashes(
          HashesK::Bin, HashesV::Bin, P1EAllLeaves::float(), NumRestLeaves::pos_integer(),
          PrevP0E::float(), MyMaxItemsCount::non_neg_integer(),
          PrevP1E_real::float(), MyActualItemsCount::non_neg_integer(),
          BucketSizeBits::pos_integer(), ExpDelta::number())
          -> {NewHashesK::Bin, NewHashesV::Bin, OtherBucketTree::kvi_tree(),
              OrigDBChunkLen::non_neg_integer(),
              SigSize::signature_size(), VSize::signature_size(),
              NextP0E::float(), NextP1E_real::float()}
      when is_subtype(Bin, bitstring()).
  merkle_resolve_retrieve_leaf_hashes(
    HashesK, HashesV, P1EAllLeaves, NumRestLeaves, PrevP0E, MyMaxItemsCount,
    PrevP1E_real, MyActualItemsCount, BucketSizeBits, ExpDelta) ->
      <<BucketSize0:BucketSizeBits/integer-unit:1, HashesKT/bitstring>> = HashesK,
      BucketSize = BucketSize0 + 1,
      P1E_next = calc_n_subparts_p1e(NumRestLeaves, P1EAllLeaves, PrevP0E),
  %%     log:pal("merkle_receive [ ~p ]:~n  ~p~n  ~p",
  %%             [self(), {NumRestLeaves, P1EAllLeaves, PrevP0E},
  %%              {BucketSize, MyMaxItemsCount, P1E_next}]),
  
negative.code:         trivial_signature_sizes(BucketSize, MyMaxItemsCount, ExpDelta, P1E_next),
      ThisP1E =
          trivial_worst_case_failprob(SigSize, BucketSize, MyMaxItemsCount, ExpDelta),
      % pay attention to floating point issues near 1:
  %%     NextP1E = 1 - (1 - PrevP1E) * (1 - ThisP1E),
      NextP1E = PrevP1E + ThisP1E - PrevP1E * ThisP1E,
      ThisP1E_real =
          trivial_worst_case_failprob(SigSize, BucketSize, MyActualItemsCount, ExpDelta),
      % pay attention to floating point issues near 1:
  