jax icon indicating copy to clipboard operation
jax copied to clipboard

lax: add defjvp_zero for nextafter_p

Open anna-researcher opened this issue 5 months ago • 0 comments

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

anna-researcher avatar Jun 26 '26 22:06 anna-researcher