New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
np.vdot() incorrect on signed zeros #7221
Comments
I'd be surprised if BLAS implementations are consistent vs. signed zero, there's probably a speed vs ieee-correctness tradeoff. vdot appears to dispatch to cblas, so it may be the inconsistency comes from there. |
For contiguous arrays, it probably depends on the BLAS implementation. But the non-contiguous implementation is faulty:
Note that np.sum() is faulty as well:
|
By the way, the way this popped up is that MKL (which is becoming the default BLAS in Anaconda) seems to get it right. |
Though it may depend on the particular specialization (depending on the ISA features)... Perhaps we should skip testing for negative zeroes ;) |
Pretty much the same as gh-21342, so will just make a note there. IIRC from the PR: You can possibly fix this for multi-dimenasional dot ( |
See:
but:
Also:
The text was updated successfully, but these errors were encountered: