Closed jeertmans closed 5 days ago
I think we'd be happy to accept a PR for the real-valued case. We have some notes on contributing here: https://jax.readthedocs.io/en/latest/contributing.html#contributing-code-using-pull-requests Please let me know if you have any questions!
Thanks you for the comment! I will do that later this week and link to this issue when ready :)
Hello!
I really enjoy using JAX for my research, but I sometimes encounter a few missing functions from
jax.numpy
andjax.scipy
, that I which were there. One important function for my research isscipy.special.fresnel
, so I decided to translate SciPy's C++ code into JAX-compatible code (see here), at least for real-valued arguments. For complex arguments, I rely on a custom complex-valued error function implementation, but its accuracy is not good.However, the real-valued variant is very accurate (the diff. with SciPy's impl. is usually
< 1e-14
using double precision). Currently, the implementation is very close to that of SciPy, but it can of course be optimized (many computations are repeated, but are maybe merged with@jit
).If you are interested, I'd be super happy to make a PR to implement the missing
jax.scipy.special.fresnel
, at least for real-valued arguments.What do you think?