提交 1fef6678 authored 作者: TimSalimans's avatar TimSalimans

Edit docstring

上级 584df0ee
...@@ -87,11 +87,14 @@ erfc = Erfc(upgrade_to_float_no_complex, name='erfc') ...@@ -87,11 +87,14 @@ erfc = Erfc(upgrade_to_float_no_complex, name='erfc')
class Erfcx(UnaryScalarOp): class Erfcx(UnaryScalarOp):
""" """
Implements the scaled complementary error function exp(x**2)*erfc(x) in a numerically stable way. Implements the scaled complementary error function exp(x**2)*erfc(x) in a numerically stable way for large x. This
is useful for calculating things like log(erfc(x)) = log(erfcx(x)) - 2 * x without causing underflow. Should only
be used if x is known to be large and positive, as using erfcx(x) for large negative x may instead introduce
overflow problems.
Note: This op can still be executed on GPU, despite not having c_code. When Note: This op can still be executed on GPU, despite not having c_code. When
running on GPU, sandbox.cuda.opt.local_gpu_elemwise_[0,1] replaces this op running on GPU, sandbox.cuda.opt.local_gpu_elemwise_[0,1] replaces this op
with sandbox.cuda.elemwise.ErfcxGPU. (Same as Erfinv below.) with sandbox.cuda.elemwise.ErfcxGPU.
""" """
def impl(self, x): def impl(self, x):
if imported_scipy_special: if imported_scipy_special:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论