jax
jax copied to clipboard
lax: add defjvp_zero for nextafter_p
jax.lax.nextafter had no JVP rule, causing NotImplementedError when
differentiating through it. Since nextafter returns the next representable
float value, the gradient is zero almost everywhere, so defjvp_zero is
the correct fix.
Fixes #38679