simon-git: spigot (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sat Apr 18 20:29:57 BST 2015


TL;DR:
  2ff99fa Add a new strategy for computing the gamma function.

Repository:     git://git.tartarus.org/simon/spigot.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=spigot.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2015-04-18 20:29:57

commit 2ff99fa5b299944d7e3afdfb6775198caa1e6ddd
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=2ff99fa5b299944d7e3afdfb6775198caa1e6ddd;hp=fdd37c660d9ebca19a995b334a23878c8b5b36b3
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Apr 18 20:25:37 2015 +0100

    Add a new strategy for computing the gamma function.
    
    Works by computing the lower and upper incomplete gamma functions for
    x=1 (via convenient continued-fraction expressions I found on
    Wikipedia a few months ago) and then just adding them together. Turns
    out it beats the speed of the old approach for small inputs, but
    becomes worse around |z|=35 and really horrible around |z|=60 (the
    performance curve looks roughly exponential), so I'm putting it in
    alongside the old approach and selecting between the two as
    appropriate.

 gamma.cpp |  313 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 293 insertions(+), 20 deletions(-)



More information about the tartarus-commits mailing list