Re: [eigen] a couple of RFCs

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


2009/8/12 Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>:
>> to work. I suggest that the default value for "precision" be -1, and
>> that this special value means "use the current precision of the
>> stream".
>
> I'm not sure I understand everything, but if the stream already has a
> 'precision', why does eigen add another one ?

Indeed, we agree that by default we should use the stream precision.

But it's still useful to leave the possibility to specify a different
precision as part of the IOFormat. For example an app could use one
IOFormat with precision=5 for debug output, and another IOFormat with
precision=16 for saving matrices to files. It would be annoying and
slippery for the user to have to specify the precision separately
everytime.

> Anyway i'm all for outputting
> double/float with LOTs of decimals by default, or at least that it is easy to
> do so.

By default, we'll use the stream's precision, I don't know if the c++
standard says anything about their own default precision, but if you
want full precision you can always to: mystream.precision(16);

Cheers,
Benoit



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