# Any reason holds Julia from having a proper Pochhammer function?

**URL:** <https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273>\
**Category:** Numerics\
**Created:** [February 24, 2017, 3:32pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273 "2017-02-24T15:32:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [February 24, 2017, 3:32pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/1 "2017-02-24T15:32:13Z")

</div>

Overflow? Inaccuracy?

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [February 24, 2017, 3:40pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/2 "2017-02-24T15:40:22Z")

</div>

Nobody has needed it and so nobody has implemented it yet? This would be useful for the Combinatorics.jl package. Why don’t you try making a pull request?

---

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [February 24, 2017, 3:44pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/3 "2017-02-24T15:44:59Z")

</div>

I see. Thanks for the encouragement. But I’m just a beginner and dare not write any thing for Julia or any libraries for serious use. 😅

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [February 24, 2017, 3:46pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/4 "2017-02-24T15:46:10Z")

</div>

It would be a pretty good introduction to how go about contributing, actually!

---

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [February 24, 2017, 3:54pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/5 "2017-02-24T15:54:02Z")

</div>

Good point. I’ll start to work on it though slowly and issue a pull request when ready. Irresistible to make my own contribution to Julia…

---

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [February 24, 2017, 8:31pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/6 "2017-02-24T20:31:32Z")

</div>

You can find an implementation in FastTransforms.jl:

[https://github.com/MikaelSlevinsky/FastTransforms.jl/blob/master/src/specialfunctions.jl#L33](https://github.com/MikaelSlevinsky/FastTransforms.jl/blob/master/src/specialfunctions.jl#L33)

---

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [February 24, 2017, 8:43pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/7 "2017-02-24T20:43:31Z")

</div>

Thanks! Is this something that we can add to Base? I think people would be reluctant to load a whole package just for using a (simple) function.

---

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [February 24, 2017, 8:44pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/8 "2017-02-24T20:44:21Z")

</div>

All the special functions in Base have been moved to SpecialFunctions.jl, so it could be moved there

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 24, 2017, 10:22pm UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/9 "2017-02-24T22:22:51Z")

</div>

SpecialFunctions is not the right place for an integer only function, though of course you could extend it via the Gamma function.

---

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [February 25, 2017, 12:41am UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273/10 "2017-02-25T00:41:58Z")

</div>

It’s easy to add a fallback that calls `lgamma` (Need to use `lgamma` Instead of `gamma` to avoid overflow)
