anchor.diff:      P1E_p1_bf_I_real = bloom_worst_case_failprob(BF, OtherBFCount, ExpDelta),
       MyNrChecks = ?IIF(OtherBFCount =:= 0, 0, MyItemCount),
       P1E_p1_bf_NI_real = bloom_worst_case_failprob(OtherBF, MyNrChecks, ExpDelta),
  -    P1E_p1_real = 1 - (1 - P1E_p1_bf_I_real) * (1 - P1E_p1_bf_NI_real),
  +    % pay attention to floating point issues near 1:
  +    % P1E_p1_real = 1 - (1 - P1E_p1_bf_I_real) * (1 - P1E_p1_bf_NI_real),
  +    P1E_p1_real = P1E_p1_bf_I_real + P1E_p1_bf_NI_real - P1E_p1_bf_I_real * P1E_p1_bf_NI_real,
       % NOTE: use left-over P1E after phase 1 (bloom) for phase 2 (trivial RC)
       P1E_p2 = calc_n_subparts_p1e(1, P1E, (1 - P1E_p1_real)),
       ?ALG_DEBUG("I:~.0p, P1E_bf=~p~n"
  
positive.code: -spec merkle_resolve_retrieve_leaf_hashes(
          HashesK::Bin, HashesV::Bin, P1EAllLeaves::float(), NumRestLeaves::pos_integer(),
          PrevP0E::float(), MyMaxItemsCount::non_neg_integer(),
          PrevP0E_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(), NextP0E_real::float()}
      when is_subtype(Bin, bitstring()).
  merkle_resolve_retrieve_leaf_hashes(
    HashesK, HashesV, P1EAllLeaves, NumRestLeaves, PrevP0E, MyMaxItemsCount,
    PrevP0E_real, MyActualItemsCount, BucketSizeBits, ExpDelta) ->
      <<BucketSize0:BucketSizeBits/integer-unit:1, HashesKT/bitstring>> = HashesK,
      BucketSize = BucketSize0 + 1,
      P1E_next = calc_n_subparts_p1e(NumRestLeaves, P1EAllLeaves, PrevP0E),
  
negative.code:     {?check_nodes, ToCheck::bitstring(), MaxItemsCount::non_neg_integer()} |
      {?check_nodes_response, FlagsBin::bitstring(), MaxItemsCount::non_neg_integer()} |
      {resolve_req, HashesK::bitstring(), HashesV::bitstring()} |
      {resolve_req, BinKeyList::bitstring(), SyncSendP1E_real::float()} |
      % dht node response
      {create_struct2, SenderI::intervals:interval(), {get_state_response, MyI::intervals:interval()}} |
      {process_db, {get_chunk_response, {intervals:interval(), db_chunk_kv()}}} |
  