GNU bug report logs - #41665
python-numpy: incorrect results on i686-linux

Previous Next

Package: guix;

Reported by: Diego Nicola Barbato <dnbarbato <at> posteo.de>

Date: Tue, 2 Jun 2020 16:17:01 UTC

Severity: normal

To reply to this bug, email your comments to 41665 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#41665; Package guix. (Tue, 02 Jun 2020 16:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Diego Nicola Barbato <dnbarbato <at> posteo.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 02 Jun 2020 16:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Diego Nicola Barbato <dnbarbato <at> posteo.de>
To: bug-guix <at> gnu.org
Subject: python-numpy: incorrect results on i686-linux
Date: Tue, 02 Jun 2020 18:16:24 +0200
Hi Guix,

On i686-linux Numpy produces incorrect results for some matrix
products.

This minimal reproducer ...

--8<---------------cut here---------------start------------->8---
python3 <<EOF
from numpy import array
from numpy.linalg import inv
A = array([[1. , 0. , 0. ],
           [0. , 3. , 3. ],
           [0. , 0. , 1. ]])
print(inv(A) @ A[:,2])
print((inv(A) @ A)[:,2])
EOF
--8<---------------cut here---------------end--------------->8---

... should return:

--8<---------------cut here---------------start------------->8---
[0. 0. 1.]
[0. 0. 1.]
--8<---------------cut here---------------end--------------->8---

On x86_64-linux, armhf-linux, and aarch64-linux I get the correct
result.  On i686-linux I get this instead:

--8<---------------cut here---------------start------------->8---
[ 0.00000000e+00 -5.55111512e-17  1.00000000e+00]
[0. 0. 1.]
--8<---------------cut here---------------end--------------->8---

I came across this bug while looking into https://debbugs.gnu.org/40406,
for which it seems to be the underlying cause.

I'm surprised this wasn't caught by Numpy's test suite.

Regards,

Diego




This bug report was last modified 3 years and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.