Regularized upper incomplete gamma function .
Evaluated directly rather than as 1 - gammainc, so a small upper
tail keeps its relative precision.
Parameters
Returns
Tensor, in the promoted dtype of the two.
Raises
NotImplementedErrorFrom
backward, when input requires a gradient: only
other is differentiable, with
.Notes
The branches and edge values mirror gammainc's:
, , for
, for a finite x. For a tiny
shape the reference framework evaluates after
rounding to 1 and loses the Euler-Mascheroni term: at
its value is 4.4% above the one mpmath computes at
, 103% above at and 286% above at
. Here that term is kept, and the value agrees with
mpmath's to float64 rounding.
Examples
>>> import lucid
>>> from lucid.special import gammaincc
>>> gammaincc(lucid.tensor([1.0, 2.0]), lucid.tensor([1.0, 10.0]))
tensor([0.3679, 0.0004994])