Re: [eigen] a couple of RFCs |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] a couple of RFCs
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 12 Aug 2009 22:40:30 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=mzcd53HrQI0O4wBHtGFxUuByo5oJB94xNa7t93+4d9k=; b=lQZtm/etk4DZUGCIs6JKOrBPB+bcSywJj8u3LgPvLCtLak93AkMcM55RU6OgaQ8P1e B4nkY/c9z68Qgo6EpXHGCWmDssqXu7MyjowgUgep1U+I3ibcB+ihGEtWO6H4oQGUk3+G PD6ShcVmSTt2s647YVbOCqReKvQqmmVxHO8XI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=LnACmwUA41IghwlpuBEEep6BXCFKhjCxV/fUfmg0RkaREYMnoX3T6EMcF7tGoA45HC SBKrruS8QbQbj6w3x2wY6KNL5u/Gmzb495Uaz+CbrEnSs21YOygu8T2mk45mjAqDxK2V vmtghid2qEJAV5MTiEtRgKT0txvwsDwL1gERc=
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