Re: [eigen] default printing format

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


On Thu, 2009-08-13 at 14:34 -0700, Keir Mierle wrote:
> Note that full precision is the default for the matrix-oriented
> processing system I've used, including matlab, octave, and numpy.

Is that so?

octave:3> [0. 1.]
ans =

   0   1

octave:5> [0. 1.3; 2.3 3.3]
ans =

   0.00000   1.30000
   2.30000   3.30000

octave:6> [0. 1e-10; 2.3 3.3]
ans =

   0.00000   0.00000
   2.30000   3.30000

> In short, printing anything less than full precision by default
> violates the principle of least surprise.

The concept of "surprise" depends on an assumption about a set of
expectations which vary wildly depending on who you ask. The closest to
a "one size fits all" solution you'll get is probably the default as
defined by the C++ standard (or common implementations thereof). To that
end I'd appreciate a "don't mess with stream settings" policy (unless
required to achieve e.g. hex output). Bear in mind that as matrices
reach a certain size readability will suffer significantly if you
increase precision (Personally, I routinely need to stare at 15x15 and
larger matrices).

On a related note, thanks to Benoit for working on this. I had been
meaning to bring this up but kept working around the issue due to time
constraints...

Rene




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