← Back to team overview

kicad-developers team mailing list archive

Re: Concerns about clearing disagreements before committing.

 

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.

Anyone that thinks that

1.000000000

is better than

1

is welcome to submit a patch for consideration.

There is no scenario in which %g will produce exponents, given the bounded data that we
are throwing at it.  The bounded data consists of the 4 billion BIU integers multiplied by
a few select BFU scaling factors.  One could take my test program and write a for loop,
redirect the output to a text file, and grep through it looking for exponents.  If I am
wrong, I will revisit the %.10g decision.

Dick







Follow ups

References