[eigen] Matrix-Matrix Multiplication gives incorrect results (C++11, sometimes) |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: [eigen] Matrix-Matrix Multiplication gives incorrect results (C++11, sometimes)*From*: Torbjörn Klatt <opensource@xxxxxxxxxxxxxxxxxx>*Date*: Thu, 18 Sep 2014 10:52:22 +0200

Hi all, I'm using dynamic row-major Eigen3 matrices. Within my code I'm generating a (n-1)xn matrix (Q_pre) and post-prefix it with a zero-row to get a nxn matrix Q. Afterwards I'll need to square it, which gives me QQ. (see 'problematic.cpp' in [1]) However, the resulting matrix QQ has its "last" (bottom-right) entry incorrectly computed. (see 'OUT: problematic' in [1]) I composed a minimal example and compiled it with the same compiler (and options) just to discover that everything goes fine. Am I missing something? Neither of the tested compilers (GCC 4.8.3, 4.9..1, Clang 3.4.2, 3.5.0) on a 64bit openSUSE 13.1 all with Eigen3 3.2.2 has a different behaviour. Nor does any of the compilers complain about anything when run with `-Wall -Wextra -Wpedantic -g -O0 -std=c++11`. Kind regards, Torbjörn Klatt [1] https://gist.github.com/torbjoernk/70731289e5a8f054bc67

**Attachment:
signature.asc**

**Follow-Ups**:**Re: [eigen] Matrix-Matrix Multiplication gives incorrect results (C++11, sometimes)***From:*Torbjörn Klatt

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Merge the evaluator branch** - Next by Date:
**Re: [eigen] Matrix-Matrix Multiplication gives incorrect results (C++11, sometimes)** - Previous by thread:
**Re: [eigen] Merge the evaluator branch** - Next by thread:
**Re: [eigen] Matrix-Matrix Multiplication gives incorrect results (C++11, sometimes)**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |