Skip to content

Possible problem with custom derivative of jnp.sinc. at x=0 #23990

Closed Answered by jakevdp
jecampagne asked this question in Q&A
Discussion options

You must be logged in to vote

I don't understand the mathematica result you quote: it just seems wrong.

For example, here is a table of sinc derivatives at x = 0 that agrees with the formula and output values used in JAX, and disagrees with the formula and values you mention from mathematica: https://calculus.subwiki.org/wiki/Sinc_function#Higher_derivatives_at_zero Note that this table is for $\sin(x)/x$, while JAX uses the convention $\sin(\pi x)/(\pi x)$ so you need to multiply the values in the table by a factor of $\pi^k$:

>>> np.pi ** 2 * (-1 / 3)
-3.289868133696453

>>> np.pi ** 4 * (1 / 5)
19.481818206800483

Checking another source, wolfram alpha returns values that match this table, and thus agrees with JAX: h…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by jecampagne
Comment options

You must be logged in to vote
3 replies
@jakevdp
Comment options

@jecampagne
Comment options

@jakevdp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants