kicad-developers team mailing list archive
Mailing list archive
Re: Concerns about clearing disagreements before committing.
At Sunday 27 of November 2011 19:07:36 from Dick Hollenbeck:
> On 11/27/2011 08:56 AM, Dick Hollenbeck wrote:
> > On 11/26/2011 03:15 PM, Vladimir Uryvaev wrote:
> >> At Saturday 26 of November 2011 23:49:27 from Lorenzo Marcantonio:
> >>> On Sat, Nov 26, 2011 at 09:30:59PM +0400, Vladimir Uryvaev wrote:
> >>>> May be I'm not human, but for me as being scientist and engineer it
> >>>> sound weird to truncate significant digits.
> >>>> 1, 1.0, 1.00 are different for me, as they carry different precision.
> >>>> So I'm all for %*f and to keep all significant digits, whatever they
> >>>> are, zeroes, or not.
> >>> If we're talking about storage I'd says omitting zero is better. On the
> >>> screen or on a report, you need to show the 'right' amount of zeroes.
> >> In GUI we do not know what precision user mean (or we have to store it),
> >> so it is no useful information.
> >> 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.
> >> 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.
I was wrong here, format define choose of format: %f if -4 <= X < P, %e
otherwise, where X is an exponent in e-format, P is a precision in format
> I hope in the biu-plan.txt we understand that I am only talking about
> saving to disk, when I talk about FMT_ENG.
I've got it.
> Vladimir you will have different concerns in the UI, and there are some
> tough design choices there which will take you to different format
In my edits in GUI I cut trailing zeros.
> Each context needs to be evaluated separately. I am not saying anything
> here about those other choices, only that I have made the choice to use a
> certain format string for the saving to disk.
I do not stand for human readability in files, I would ever prefer binary, or
simple ASCII like in gerbers (as machine readability/writability is worth more
for me, than human readability, 'cause I do not read them myself). But if I
design human-readable format, i prefer numbers with clearly defined precision.
I'll better write short own number formatting function for saving/loading,
- configurable (all you want: precision, removing trailing 0s...),
- independent from locale settings,
- possibly faster than printf.
--- KeyFP: DC07 D4C3 BB33 E596 CF5E CEF9 D4E3 B618 65BA 2B61