Skip to content

Add Bessel Functions and Pochhammer Symbols #96

Description

@bob-carpenter

Bessel functions of first and second kind.

And the Pocchammer symbols:

falling_factorial(x,n) = x! / n!
rising_factorial(x,n) = (x + n - 1)! / (x - 1)!

Activity

  1. PeterLi2016 commented on May 29, 2013

    @PeterLi2016
    Contributor

    Adding the actual functions to our math lib won't be bad, but I'm not sure how we're going to do the fwd mode and reverse mode auto diff with the series. I've worked out what the fwd mode auto diff would be as a series for bessel functions of the first kind, but I'm not sure how to condense it:

    image

  2. bob-carpenter commented on May 29, 2013

    @bob-carpenter
    MemberAuthor

    Check out the identities in the descriptions in the Boost
    doc:

    http://www.boost.org/doc/libs/1_53_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html

    They work them out directly for Bessel functions of the first
    and second kind.

    • Bob

    On 5/29/13 2:42 PM, Peter Li wrote:

    Adding the actual functions to our math lib won't be bad, but I'm not sure how we're going to do the fwd mode and
    reverse mode auto diff with the series. I've worked out what the fwd mode auto diff would be as a series for bessel
    functions of the first kind, but I'm not sure how to condense it:

    image https://f.cloud.github.com/assets/3487481/580693/457b0b90-c88d-11e2-8bd3-c7a3f2f2e8d0.png

    —
    Reply to this email directly or view it on GitHub #96 (comment).

  3. PeterLi2016 commented on May 29, 2013

    @PeterLi2016
    Contributor

    I worked it out and I think the derivatives they give are with respect
    to z. That's helpful for rev mode, but we still have the problem with
    forward mode. And now that I think about it, I think I have the same
    problem with Owen's T, which I still need to implement in fwd mode.

    Peter

    On 5/29/13 2:55 PM, Bob Carpenter wrote:

    Check out the identities in the descriptions in the Boost
    doc:

    http://www.boost.org/doc/libs/1_53_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/bessel_over.html

    They work them out directly for Bessel functions of the first
    and second kind.

    • Bob

    On 5/29/13 2:42 PM, Peter Li wrote:

    Adding the actual functions to our math lib won't be bad, but I'm
    not sure how we're going to do the fwd mode and
    reverse mode auto diff with the series. I've worked out what the fwd
    mode auto diff would be as a series for bessel
    functions of the first kind, but I'm not sure how to condense it:

    image
    https://f.cloud.github.com/assets/3487481/580693/457b0b90-c88d-11e2-8bd3-c7a3f2f2e8d0.png

    —
    Reply to this email directly or view it on GitHub
    #96 (comment).

    —
    Reply to this email directly or view it on GitHub
    #96 (comment).

  4. bob-carpenter commented on May 29, 2013

    @bob-carpenter
    MemberAuthor

    On 5/29/13 3:24 PM, Peter Li wrote:

    I worked it out and I think the derivatives they give are with respect
    to z.

    Right.

    But the order's an int, so we shouldn't need to differentiate
    with respect to that.

    That's helpful for rev mode, but we still have the problem with
    forward mode. And now that I think about it, I think I have the same
    problem with Owen's T, which I still need to implement in fwd mode.

    For either forward or reverse you need the same partial derivatives.
    So if you can do one, you can do the other.

    • Bob
  5. PeterLi2016 commented on May 29, 2013

    @PeterLi2016
    Contributor

    Alright. What category would the Bessel functions go under?

  6. bob-carpenter commented on May 29, 2013

    @bob-carpenter
    MemberAuthor

    On 5/29/13 3:58 PM, Peter Li wrote:

    Alright. What category would the Bessel functions go under?

    Category as in special function? They should go wherever
    the gamma functions go.

    It'll be great to get these in because they're required for
    a bunch of fancy distributions that will then be relatively
    easy to code up in Stan.

    • Bob
  7. syclik commented on Jun 26, 2013

    @syclik
    Member

    Pull request #98 fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions