Skip to content

jnp.fft vs. spicy.ftt expected numerical difference #22058

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

You must be logged in to vote

JAX defaults to 32-bit computation (complex64 = two 32-bit components), while numpy/scipy default to 64-bit, even when inputs are 32-bit. The difference you're seeing is typical of rounding error for 32-bit computations. If you enable 64-bit computations in JAX (see JAX Sharp Bits: 64-bit precision) then you will see rounding errors typical of 64-bit float computation.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@amirhkhalilian
Comment options

Answer selected by amirhkhalilian
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