Actually quantity isn't rounding at all, as expected.  It is giving me full
precision, sometime 9 or 10 digits.  Here is an example:

ledger bal Investments --collapse  --limit "commodity=='VIFSX'" --format
"%(quantity(strip(display_total))) %(quantity(market(total)))"

123.1234567891 12345.123456789123

I want the output to be

123.1234 12345.12

Is there some way to control the final displayed precision ala printf
%10.4f


On Tue, Nov 1, 2011 at 22:45, John Wiegley <[email protected]> wrote:

> >>>>> Craig Earls <[email protected]>
> writes:
>
> > I am totally mystified at how ledger is determining what to display.  Is
> > there a way to control the precision used to display a quantity?  e.g.:
>
> > force --format "%(quantity(strip(display_total))) to show only 4
> significant
> > figures?
>
> > I am trying to generate data for an external program and it would be more
> > convenient to be able to export the quantities and bare numbers without
> > annotations.
>
> It's rounding even after you use quantity?  And what kinds of annotations
> do
> you mean?  Can you give me a little example?
>
> Thx, John
>



-- 
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

Reply via email to