JuliaMath / SpecialFunctions.jl

Special mathematical functions in Julia

Home Page:https://specialfunctions.juliamath.org/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What about `gamma_inc_inv`'s derivative ?

lrnv opened this issue · comments

I am hitting the following issue :

ERROR: MethodError: no method matching __gamma_inc_inv(::ForwardDiff.Dual{...}, ::ForwardDiff.Dual{...}, ::Bool)

Is there somewhere an implementation for such a derivative ? I guess the routines for the inverse of the gamma incomplete function are based on numerical root finding, so it that even possible ?

There are analytical formulas for the derivatives. One of them is fine, but the other involves the Meijer G function, which we don't have (#265).

We could add a chain rule for the derivative with respect to the second argument, but ForwardDiff doesn't support ChainRules (unless you also import https://github.com/ThummeTo/ForwardDiffChainRules.jl, which we don't currently do here).

It looks like the derivatives you linked to on wikipedia are for the gamma incomplete function, and not its inverse, if I am not mistaking.