This bugzilla service is closed. All entries have been migrated to
Bug 496 - Incorrect results adding outer product to triangularView
Summary: Incorrect results adding outer product to triangularView
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.1
Hardware: x86 - 64-bit Linux
: Normal Unknown
Assignee: Nobody
Depends on:
Blocks: 3.2
  Show dependency treegraph
Reported: 2012-08-03 21:01 UTC by Oliver Ruepp
Modified: 2019-12-04 11:48 UTC (History)
3 users (show)

Example for the problem using triangularView() (1.82 KB, text/x-c++src)
2012-08-03 21:01 UTC, Oliver Ruepp
no flags Details

Description Oliver Ruepp 2012-08-03 21:01:27 UTC
Created attachment 290 [details]
Example for the problem using triangularView()

I think I've found a bug in the triangularView() functionality. I experienced the problem only when adding an outer product that is formed from row vectors of some matrix. Everything seems to be fine when column vectors are used. See attached file for an example.
Comment 1 Jitse Niesen 2013-02-24 20:43:16 UTC
Thanks for your report. I confirmed the issue. It's in quite a complicated bit of code, so I couldn't find what's going on right away. 

The failing statement is:

matA.triangularView<Lower>() += matB.row(0).transpose() * matB.row(0);

The bug persists if I turn off all optimization and vectorization and if the matrices are small (3-by-3), so hopefully it won't be too hard for Gaël to figure out what the problem is.
Comment 2 Gael Guennebaud 2013-02-24 21:14:47 UTC
Thank you for the analysis, I'll take a look right now.
Comment 3 Gael Guennebaud 2013-02-24 23:06:22 UTC
changeset:   2072d9770c31
user:        ggael
date:        2013-02-24 23:05:42
summary:     Fix bug 496: generalize internal rank1_update implementation to accept uplo(A) += v * w and make A.triangularView() += v * w uses it.
Update unit tests and blas interface respectively.
Comment 4 Nobody 2019-12-04 11:48:56 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance:

Note You need to log in before you can comment on or make changes to this bug.