<commit_before>#include "factorial.hxx"

#include <boost/math/special_functions/expint.hpp>

// integral(0) = b^x tgamma(0,x*log(b)) = -(b^x) expint(0, -x log(b))
// integral(k) = d(integral(k-1),x)/k
//
// In closed form
//
// integral(k) = (b^x Gamma(0, x log(b)) * (log(b))^k
//                + Sum(i={1..=k}) {(-1)^k * (i-1)! (-log(b))^(k-i) / x^i})/k!

Boost_Float
integral(const Boost_Float &b, const Boost_Float &x, const int64_t &k)<commit_msg>Fix comment<commit_after>#include "factorial.hxx"

#include <boost/math/special_functions/expint.hpp>

// integral(0) = b^x tgamma(0,x*log(b)) = -(b^x) expint(0, -x log(b))
// integral(k) = d(integral(k-1),x)/k
//
// In closed form
//
// integral(k) = -(b^x expint(0, -x log(b)) * (log(b))^k
//                + Sum(i={1..=k}) {(-1)^k * (i-1)! (-log(b))^(k-i) / x^i})/k!

Boost_Float
integral(const Boost_Float &b, const Boost_Float &x, const int64_t &k)
{'fraction_non_alphanumeric': 0.2579933847850055, 'fraction_numerical': 0.022050716648291068, 'mean_word_length': 3.450980392156863, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '7592320', 'n_tokens_mistral': 428, 'n_tokens_neox': 404, 'n_words': 74}