Scaled complementary error function.
Computes , the
Mills-ratio-friendly scaling of the complementary error function.
Whereas underflows to zero for moderately
large , erfcx decays only as and
remains finite, which is essential for tail-probability evaluations
of Gaussian-related distributions.
Parameters
inputTensorInput tensor; any floating-point dtype.
Returns
Tensor element-wise, same shape and
dtype as input.
Notes
Mathematical definition:
From the value is the continued fraction , never the product, whose factors hit opposite extremes. The derivative, , is read from the fraction's tail as from .
Examples
>>> import lucid
>>> from lucid.special import erfcx
>>> erfcx(lucid.tensor([0.0, 1.0, 5.0]))
tensor([1., 0.4276, 0.1107])