<commit_before>
Anant  -- Algorithmic 'n Analytic Number Theory
===============================================

<p style="text-align: center;"><b>
<i>Version 0.2.4</i><br>
<NAME> March 2019<br>
<EMAIL>
</b></p>


This project contains ad-hoc implementations of assorted analytic
functions of interest in number theory, including the gamma function,
the Riemann zeta function, the polylogarithm, and the Minkowski
question mark function. The implementation uses the Gnu Multi-Precision
library (GMP) to perform all low-level operations.  The code herein
is licensed under the terms of the Gnu GPLv3 license.

This project is *NOT* meant to be a replacement for other, more
established multi-precision systems, such as MPFR or PARI/GP.  It is
meant to be a staging area for implementations of functions that have
not (yet!) received much attention in the more established packages.
Users are strongly encouraged to port the contents of this package
to other systems. Please! 
Seriously: the stuff here is still cutting-edge, fifteen years on.
I really would like to see the "serious" math packages actually
implement these functions!

A note about floating-point exceptions: many of the special functions
computed here have poles at various values.  These will show up as
mysterious floating-point exceptions deep within the code.  If you
get an exception, make sure you are not evaluating a function at a pole!

This package has its origins as a collection of tools & utilities for
the benefit of the author.  As such, it was never really intended for
public consumption, and thus, will not have the usual amenities of
established projects, such as clear documentation, a website, unit
test cases, or even a robust build system.  Caveat Emptor! It works
great for me, and I use it all the time; but I am me, and not you.

There are several publications that describe this code, or make use of
it. The most notable is this:

<NAME>. (2008) ["An efficient algorithm for accelerating
the convergence of oscillatory series, useful for computing the
polylogarithm and Hurwitz zeta functions"]
(http://link.springer.com/article/10.1007/s11075-007-9153-8).
*Numerical Algorithms* vol. **47** issue 3: pp. 211-252.
[arXiv:math.CA/0702243](https://arxiv.org/abs/math/0702243).
doi:10.1007/s11075-007-9153-8.

The most fun thing created with this code is this:
[Linas' Art Gallery](https://linas.org/art-gallery).

The most verbose thing created with this code is this:
[The Modular Group and Fractals](https://linas.org/math/sl2z.html)
<i>An exploration of the relationship between Fractals, the Riemann Zeta,
the Modular Group Gamma, the Farey Fractions and the Minkowski Question
Mark.</i>

Supported functions
-------------------
Many of the functions below are not "difficult"; what makes the code
here unique is that many of these use caching and partial computation
to avoid repeated computations. In some cases, this caching allows the
functions to be particularly fast when called in "sequential" order,
as would naturally occur in summations. This can provide speedups of
over a thousand-fold, when used correctly!

Another, apparently "unique" feature, as compared to established
libraries, is that most of the functions are handled on the complex
plane.  Thus, the system comes with basic complex-number support.

Some, but not all of the code is protected by spinlocks, and so can be
used in parallel, i.e. in a multi-threaded setting. This can also give
a big boost in performance.  This code is used regularly on a 24-core
CPU. It works.

Arbitrary precision constants
-----------------------------
* sqrt(3)/2, log(2)
* e, e^pi
* pi, 2pi, pi/2, sqrt(2pi), log(2pi), 2/pi
* Euler-Mascheroni const
* Riemann zeta(1/2)

Combinatorial functions:
------------------------
* Rising pochhammer symbol (integer)
* Partition function (integer)
* Reciprocal factorial
* Sequential binomial coefficient
* Stirling Numbers of the First Kind
* Stirling Numbers of the Second Kind
* Bernoulli Numbers
* Binomial transform of power sum
* Rising pochhammer symbol (real)    i.e. (s)_n for real s
* Rising pochhammer symbol (complex) i.e. (s)_n for complex s
* Binomial coefficient (complex)     i.e. (s choose n) for complex s
* High-speed, cached sequential-access binomial coefficient.

Elementary functions:
---------------------
* pow, exp, log, sine, cosine, tangent for real, complex arguments
* arctan, arctan2 for real argument
* log(1-x) for real, complex x
* sqrt for complex argument

Classical functions:
--------------------
* gamma (factorial) for real, complex argument
* polylogarithm, using multiple algorithms: Borwein-style, Euler-Maclaurin
* polylogarithm on multiple sheets (monodromy)
* Periodic zeta function
* Hurwitz zeta function, using multiple algorithms; complex arguments.
* Riemann zeta function, using multiple algorithms: Borwein, Hasse, brute-force
  for integer, real and complex arguments.
* Confluent hypergeometric function, complex arguments

Number-theoretic functions:
---------------------------
* General complex-valued harmonic number
* Gauss-Kuzmin-Wirsing operator matrix elements
* Minkowski Question Mark function (Stern-Brocot tree), and its inverse
* Taylor's series coefficients for the topologist's sin -- sin(2pi/(1+x))

Utilities:
----------
* Fill in values of completely multiplicative arithmetic function.
* Ordinary and exponential generating functions for arithmetic functions.
* Euler re-summation of convergent series (speeds convergence).
* Powell's method for zero-finding on complex plane (noise-cancelling variant).


Pre-requisites, Compiling, Installing, Testing<commit_msg>Announce Newton series summation<commit_after>
Anant  -- Algorithmic 'n Analytic Number Theory
===============================================

<p style="text-align: center;"><b>
<i>Version 0.2.4</i><br>
<NAME> March 2019<br>
<EMAIL>
</b></p>


This project contains ad-hoc implementations of assorted analytic
functions of interest in number theory, including the gamma function,
the Riemann zeta function, the polylogarithm, and the Minkowski
question mark function. The implementation uses the Gnu Multi-Precision
library (GMP) to perform all low-level operations.  The code herein
is licensed under the terms of the Gnu GPLv3 license.

This project is *NOT* meant to be a replacement for other, more
established multi-precision systems, such as MPFR or PARI/GP.  It is
meant to be a staging area for implementations of functions that have
not (yet!) received much attention in the more established packages.
Users are strongly encouraged to port the contents of this package
to other systems. Please! 
Seriously: the stuff here is still cutting-edge, fifteen years on.
I really would like to see the "serious" math packages actually
implement these functions!

A note about floating-point exceptions: many of the special functions
computed here have poles at various values.  These will show up as
mysterious floating-point exceptions deep within the code.  If you
get an exception, make sure you are not evaluating a function at a pole!

This package has its origins as a collection of tools & utilities for
the benefit of the author.  As such, it was never really intended for
public consumption, and thus, will not have the usual amenities of
established projects, such as clear documentation, a website, unit
test cases, or even a robust build system.  Caveat Emptor! It works
great for me, and I use it all the time; but I am me, and not you.

There are several publications that describe this code, or make use of
it. The most notable is this:

<NAME>. (2008) ["An efficient algorithm for accelerating
the convergence of oscillatory series, useful for computing the
polylogarithm and Hurwitz zeta functions"]
(http://link.springer.com/article/10.1007/s11075-007-9153-8).
*Numerical Algorithms* vol. **47** issue 3: pp. 211-252.
[arXiv:math.CA/0702243](https://arxiv.org/abs/math/0702243).
doi:10.1007/s11075-007-9153-8.

The most fun thing created with this code is this:
[Linas' Art Gallery](https://linas.org/art-gallery).

The most verbose thing created with this code is this:
[The Modular Group and Fractals](https://linas.org/math/sl2z.html)
<i>An exploration of the relationship between Fractals, the Riemann Zeta,
the Modular Group Gamma, the Farey Fractions and the Minkowski Question
Mark.</i>

Supported functions
-------------------
Many of the functions below are not "difficult"; what makes the code
here unique is that many of these use caching and partial computation
to avoid repeated computations. In some cases, this caching allows the
functions to be particularly fast when called in "sequential" order,
as would naturally occur in summations. This can provide speedups of
over a thousand-fold, when used correctly!

Another, apparently "unique" feature, as compared to established
libraries, is that most of the functions are handled on the complex
plane.  Thus, the system comes with basic complex-number support.

Some, but not all of the code is protected by spinlocks, and so can be
used in parallel, i.e. in a multi-threaded setting. This can also give
a big boost in performance.  This code is used regularly on a 24-core
CPU. It works.

Arbitrary precision constants
-----------------------------
* sqrt(3)/2, log(2)
* e, e^pi
* pi, 2pi, pi/2, sqrt(2pi), log(2pi), 2/pi
* Euler-Mascheroni const
* Riemann zeta(1/2)

Combinatorial functions:
------------------------
* Rising pochhammer symbol (integer)
* Partition function (integer)
* Reciprocal factorial
* Sequential binomial coefficient
* Stirling Numbers of the First Kind
* Stirling Numbers of the Second Kind
* Bernoulli Numbers
* Binomial transform of power sum
* Rising pochhammer symbol (real)    i.e. (s)_n for real s
* Rising pochhammer symbol (complex) i.e. (s)_n for complex s
* Binomial coefficient (complex)     i.e. (s choose n) for complex s
* High-speed, cached sequential-access binomial coefficient.

Elementary functions:
---------------------
* pow, exp, log, sine, cosine, tangent for real, complex arguments
* arctan, arctan2 for real argument
* log(1-x) for real, complex x
* sqrt for complex argument

Classical functions:
--------------------
* gamma (factorial) for real, complex argument
* polylogarithm, using multiple algorithms: Borwein-style, Euler-Maclaurin
* polylogarithm on multiple sheets (monodromy)
* Periodic zeta function
* Hurwitz zeta function, using multiple algorithms; complex arguments.
* Riemann zeta function, using multiple algorithms: Borwein, Hasse, brute-force
  for integer, real and complex arguments.
* Confluent hypergeometric function, complex arguments

Number-theoretic functions:
---------------------------
* General complex-valued harmonic number
* Gauss-Kuzmin-Wirsing operator matrix elements
* Minkowski Question Mark function (Stern-Brocot tree), and its inverse
* Taylor's series coefficients for the topologist's sin -- sin(2pi/(1+x))

Utilities:
----------
* Fill in values of completely multiplicative arithmetic function.
* Ordinary and exponential generating functions for arithmetic functions.
* Euler re-summation of convergent series (speeds convergence).
* Newton series interpolation of arithmetic series.
* Powell's method for zero-finding on complex plane (noise-cancelling variant).


Pre-requisites, Compiling, Installing, Testing
{'fraction_non_alphanumeric': 0.10094414541604164, 'fraction_numerical': 0.015882820082943616, 'mean_word_length': 4.147138964577657, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 6, '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': '845252', 'n_tokens_mistral': 3273, 'n_tokens_neox': 2963, 'n_words': 1476}