New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Bug 616 - Matrix printing does not align colums correctly when scientific format is used
Summary: Matrix printing does not align colums correctly when scientific format is used
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: unspecified
Hardware: All All
: Normal minor
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-18 14:21 UTC by Alexander Werner
Modified: 2013-10-17 14:20 UTC (History)
3 users (show)



Attachments
Code to reproduce problem (148 bytes, text/x-c++src)
2013-06-18 14:21 UTC, Alexander Werner
no flags Details

Description Alexander Werner 2013-06-18 14:21:27 UTC
Created attachment 351 [details]
Code to reproduce problem

This is just a question of readablity:
Output:
1e-14 0 0
0 1 0
0 0 1

Expected output (correctly aligned colums):
1e-14 0 0
    0 1 0
    0 0 1

Very simple test code:

Eigen::MatrixXd m(3,3);
m.setIdentity();
m(0,0) = 1e-14;
std::cout << m << std::endl;
Comment 1 Christoph Hertzberg 2013-10-17 14:20:04 UTC
Fixed in default and 3.2:
https://bitbucket.org/eigen/eigen/commits/ea017838ee22b18d14df9c8312d95dd6778d48f5

The actual problem was that the first column was ignored during computation of maximal width.

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