Tag Archives: Algorithms

Adventures of a Programmer: Parser Writing Peril XXXVI

The Logarithm of the Gamma Function over the Complex Plane with a Smooth Principal Value

As an approximation of course (where applicable) done with the Stirling series but that information would have made the header a wee bit too long.

The problem with the Stirling series is that the number of summands depend on the input; there is an ideal number of summands for a given precision. But don’t worry, D.E.G. Hare did all the math for us. Continue reading


On the numerical evaluation of factorials II

A very basic but working big integer implementation

In this episode we will build a basic set of operations, namely addition,
subtraction and multiplication. Division is not needed but will be given,
too, as I am without mercy. Continue reading

On the numerical evaluation of factorials I


This is the first post of what will be a very long series about calculating factorials and it is even a long way to the first calculation of a factorial.
At first let us build something for the actual calculations that is able to do it with arbitrary precision, do it fast enough and does not need any special software. A good compromise would be Javascript: it is build-in in every browser, rarely switched off if used locally, a lot of tutorials are
available for free and for money, and the author has a lot of that stuff already written. The last argument is the winning one, of course.
Oh, and: yes, this implementation will be with FFT!
Continue reading