<commit_before>use 5.014;
use warnings;

our ($ROUND, $PREC);

sub __harmfrac__ {    # takes an unsigned integer
    my ($ui) = @_;

    $ui || goto &Math::AnyNum::_zero;
    $ui < 0 && goto &Math::AnyNum::_nan;

    # Use binary splitting for large values of n. (by <NAME>)
    # http://fredrik-j.blogspot.ro/2009/02/how-not-to-compute-harmonic-numbers.html
    if ($ui > 7000) {

        my $num = Math::GMPz::Rmpz_init_set_ui(1);

        my $den = Math::GMPz::Rmpz_init_set_ui($ui);
        Math::GMPz::Rmpz_add_ui($den, $den, 1);

        my $temp = Math::GMPz::Rmpz_init();

        # Translation of Dana Jacobsen's code from Math::Prime::Util::{PP,GMP}.
        #   https://metacpan.org/pod/Math::Prime::Util::PP
        #   https://metacpan.org/pod/Math::Prime::Util::GMP
        my $sub;
        $sub = sub {
            my ($num, $den) = @_;
            Math::GMPz::Rmpz_sub($temp, $den, $num);<commit_msg>- Minor simplification in __harmfrac__(n) for n > 7000.<commit_after>use 5.014;
use warnings;

our ($ROUND, $PREC);

sub __harmfrac__ {    # takes an unsigned integer
    my ($ui) = @_;

    $ui || goto &Math::AnyNum::_zero;
    $ui < 0 && goto &Math::AnyNum::_nan;

    # Use binary splitting for large values of n. (by <NAME>)
    # http://fredrik-j.blogspot.ro/2009/02/how-not-to-compute-harmonic-numbers.html
    if ($ui > 7000) {

        my $num = Math::GMPz::Rmpz_init_set_ui(1);
        my $den = Math::GMPz::Rmpz_init_set_ui($ui + 1);

        my $temp = Math::GMPz::Rmpz_init();

        # Translation of <NAME>'s code from Math::Prime::Util::{PP,GMP}.
        #   https://metacpan.org/pod/Math::Prime::Util::PP
        #   https://metacpan.org/pod/Math::Prime::Util::GMP
        my $sub;
        $sub = sub {
            my ($num, $den) = @_;
            Math::GMPz::Rmpz_sub($temp, $den, $num);
{'fraction_non_alphanumeric': 0.18276619099890232, 'fraction_numerical': 0.020856201975850714, 'mean_word_length': 2.6606425702811247, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4909424', 'n_tokens_mistral': 729, 'n_tokens_neox': 666, 'n_words': 137}