in reply to Re^4: Stats for super search look buggy
in thread Stats for super search look buggy

Diminishing the bigger a ° value by the gap-distance, if it exceeds the threshold, is sufficient.

$bigger_node_in_search_range -= $jump if $bigger_node_in_search_range > 1233781;

for ($node_min, $node_max) { $_ -= $jump if $_ > 1233781; }

Calculate percentage then

update

°) sorry, both could have jumped.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^6: Stats for super search look buggy
by jdporter (Paladin) on May 10, 2021 at 12:00 UTC

    that looks more complicated to me. and less easily understood for a future maintainer. :-)

      > less easily understood for a future maintainer

      Au contraire, it's reversing the problem 1-to-1.

      I'd use an anonymous sub encapsulating the transformation and documenting the reason why.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery