Boost C++ Libraries: Ticket #7029: Add trigamma function https://svn.boost.org/trac10/ticket/7029 <p> Boost has implementation of digamma function. It would be nice to have implementation of trigamma function (second derivative of ln(Gamma())). <a class="ext-link" href="http://en.wikipedia.org/wiki/Trigamma_function"><span class="icon">​</span>http://en.wikipedia.org/wiki/Trigamma_function</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7029 Trac 1.4.3 anonymous Wed, 31 Jul 2013 03:57:19 GMT <link>https://svn.boost.org/trac10/ticket/7029#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7029#comment:1</guid> <description> <p> Yes, trigamma would be appreciated! Please. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 31 Jul 2013 08:01:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7029#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7029#comment:2</guid> <description> <p> FYI There's a Google summer of code student working on polygamma so hopefully this will come to pass... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 01 Aug 2013 06:50:06 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7029#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7029#comment:3</guid> <description> <p> Do you mean this? <a class="ext-link" href="http://code.google.com/p/pmtk3/source/browse/trunk/misc/fastfit/trigamma.m?spec=svn1197&amp;r=1197"><span class="icon">​</span>http://code.google.com/p/pmtk3/source/browse/trunk/misc/fastfit/trigamma.m?spec=svn1197&amp;r=1197</a> </p> <p> Looks interesting. Thank you. But I trust boost MUCH more than google, taking into account eg google translator which is an bottomless source of inspiration for demotivators. When I use something from boost I can assume that it is perfect (almost). When I use something from google it is like mine field. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 01 Aug 2013 08:16:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7029#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7029#comment:4</guid> <description> <p> No, I meant: <a class="ext-link" href="http://www.google-melange.com/gsoc/project/google/gsoc2013/nikhar/52001"><span class="icon">​</span>http://www.google-melange.com/gsoc/project/google/gsoc2013/nikhar/52001</a> with code at: <a class="ext-link" href="https://github.com/BoostGSoC/boost.math"><span class="icon">​</span>https://github.com/BoostGSoC/boost.math</a> </p> <p> But please note it's very early days yet, nothing there ready for Boost primetime yet... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 01 Aug 2013 09:49:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7029#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7029#comment:5</guid> <description> <p> Looks like a great beginning! Good luck. And I implemented trigamma using <a class="ext-link" href="http://upload.wikimedia.org/math/a/8/0/a80acd50152662cd7bcd41659fe489cc.png"><span class="icon">​</span>http://upload.wikimedia.org/math/a/8/0/a80acd50152662cd7bcd41659fe489cc.png</a> <a class="ext-link" href="http://upload.wikimedia.org/math/6/6/9/66906e84ea81f06b3dbad5a8bf24558c.png"><span class="icon">​</span>http://upload.wikimedia.org/math/6/6/9/66906e84ea81f06b3dbad5a8bf24558c.png</a> LoL. Very slow working but quick to implement. :-) Proper implementation would use Remez and asymptotic expansions I suppose. Have no time for it. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 29 Oct 2013 14:51:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7029#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7029#comment:6</guid> <description> <p> Is there any progress on that? Really looking forward to use the trigamma function! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sun, 26 Oct 2014 17:12:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7029#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7029#comment:7</guid> <description> <p> Well it only took a year! </p> <p> There's now a complete polygamma implementation in the bernoulli-tgamma branch of Boost math, available as a zip here <a class="ext-link" href="https://github.com/boostorg/math/archive/bernoulli-tgamma.zip"><span class="icon">​</span>https://github.com/boostorg/math/archive/bernoulli-tgamma.zip</a>. </p> <p> There are still docs to write, so it won't get officially released just yet, but in the mean time if you have any feedback or concrete use cases they would be much appreciated. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 03 Nov 2014 13:04:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7029#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7029#comment:8</guid> <description> <p> Hi, </p> <p> thanks for the fine work! I stumbled on this by chance today! I am currently struggling with extracting the minimal subset required to test it with my software, but so far no real success as the polygamma function relies on quite a large new subset of things. </p> <p> But may I ask why the multiplication theorem is not used in the formulas? It seems to be a nice way to reduce the problem for large arguments instead of heaving to rely on Bernoulli coefficients. </p> <p> As you asked for concrete use cases: I want to use it for the gradient and Hessian of the Dirichlet-Function and in this case I need the bigamma and trigamma function at the same time. Therefore I miss a way to just compute both at the same time as they should share some computations... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 03 Nov 2014 19:04:22 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7029#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7029#comment:9</guid> <description> <p> Many thanks for the response, </p> <blockquote class="citation"> <p> But may I ask why the multiplication theorem is not used in the formulas? It seems to be a nice way to reduce the problem for large arguments instead of heaving to rely on Bernoulli coefficients. </p> </blockquote> <p> The Bernoulli expansion is pretty efficient, for example at double precision it requires recursion to x &gt; 9, then just 9 Bernoulli terms to converge. </p> <p> I don't immediately see how the <a class="ext-link" href="http://functions.wolfram.com/GammaBetaErf/PolyGamma2/16/02/01/0002/"><span class="icon">​</span>argument multiplication formula</a> helps in this case - as each reduction in x results in 2 new polygamma functions. </p> <blockquote class="citation"> <p> As you asked for concrete use cases: I want to use it for the gradient and Hessian of the Dirichlet-Function and in this case I need the bigamma and trigamma function at the same time. Therefore I miss a way to just compute both at the same time as they should share some computations... </p> </blockquote> <p> I don't think there much overlap in terms of computation as digamma uses rational approximations for the evaluation. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 05 Feb 2015 19:06:24 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7029#comment:10 https://svn.boost.org/trac10/ticket/7029#comment:10 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in develop </p> Ticket