jax.scipy.special.fresnel#
- jax.scipy.special.fresnel = <jax._src.custom_derivatives.custom_jvp object>[source]#
The Fresnel integrals.
JAX implementation of
scipy.special.fresnel.The Fresnel integrals are defined by
\[\begin{split}\begin{aligned} S(x) &= \int_0^x \sin\left(\pi t^2 / 2\right)\mathrm{d}t, \\ C(x) &= \int_0^x \cos\left(\pi t^2 / 2\right)\mathrm{d}t. \end{aligned}\end{split}\]- Parameters:
x (ArrayLike) – arraylike, real-valued.
- Returns:
A tuple
(S, C)of arrays containing the values of the Fresnel integrals.- Return type:
Notes
The JAX version only supports real-valued inputs, and is based on the SciPy C++ implementation, see here. For
float32dtypes, the implementation is directly based on the Cephes implementationfresnlf.As for the original Cephes implementation, the accuracy is only guaranteed in the domain [-10, 10]. Outside of that domain, one could observe divergence between the theoretical derivatives and the custom JVP implementation, especially for large input values.
Finally, for half-precision data types,
float16andbfloat16, the array elements are upcasted tofloat32as the Cephes coefficients used in series expansions would otherwise lead to poor results. Other data types, likefloat8, are not supported.