diff --git a/src/beignet/special/__init__.py b/src/beignet/special/__init__.py index 4baf612a7d..70d1c598fe 100644 --- a/src/beignet/special/__init__.py +++ b/src/beignet/special/__init__.py @@ -1,9 +1,13 @@ +from ._dawson_integral_f import dawson_integral_f from ._error_erf import error_erf from ._error_erfc import error_erfc +from ._error_erfi import error_erfi from ._faddeeva_w import faddeeva_w __all__ = [ + "dawson_integral_f", "error_erf", "error_erfc", + "error_erfi", "faddeeva_w", ] diff --git a/src/beignet/special/_dawson_integral_f.py b/src/beignet/special/_dawson_integral_f.py index 5a8519440a..cdf8d8d178 100644 --- a/src/beignet/special/_dawson_integral_f.py +++ b/src/beignet/special/_dawson_integral_f.py @@ -1,5 +1,15 @@ +import math + +import torch from torch import Tensor +import beignet.special + def dawson_integral_f(input: Tensor) -> Tensor: - pass + return ( + math.sqrt(torch.pi) + / 2.0 + * torch.exp(-torch.square(input)) + * beignet.special.error_erfi(input) + )