← Back to team overview

kicad-developers team mailing list archive

Re: Concerns about clearing disagreements before committing.


On Sun, Nov 27, 2011 at 01:15:19AM +0400, Vladimir Uryvaev wrote:
> In GUI we do not know what precision user mean (or we have to store it), so it 
> is no useful information.

Gerbtool has exactly such a preference dialog. Usually I work with 0.01 mm
precision (manufacturing allowance is usually around 0.05 mm), but obviously paying
more give better control on the process...

> In file precision mean storage precision and is known. Anyway, fixed format is 
> preferable in machine read data. Note, if you speak about human readability, 
> not storage efficiency, such precision would be precious information. If you're 
> about efficiency, you would prefer binary file or BASE64 at least.

Talking about precision, since we're using printf, you should specify
it since the default is only 6. In storage why use a float since internal units
are ints? As you said fixed precision is preferable (well you *could* save your
float as a binary number, but we're talking about legibility here...)

> Also as I noted above %g may switch to exponent format (AFAIR it is not 
> specified by standard -- when it happen), which could be undesirable.

Manpage says: Style e is used if the exponent from its conversion is less than
-4 or greater than or equal to the  precision. Trailing zeros are removed from
the fractional part of the result. That's what SUS and maybe C99 says; M$
libraries may vary, as usual XD

Lorenzo Marcantonio
Logos Srl