You are not logged in.

#1 2010-04-23 16:51:57

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Changing from 2048K to 2.0M not 1024K to 1.0M...

Just out of curiosity, why does pacman start using megabytes as the unit it displays during a download when the number of megabytes becomes greater than 2? If I were designing it I would've done this when the number became greater than 1.

It also reminds me of some ammeters and voltmeters which will show 3 decimal places while the first digit is 1 but only 2 decimal places when the first digit becomes 2. e.g. increasing current 1.789 A, 1.834 A, 1.929 A, 2.01 A, ...

Is this some inside joke among software engineers and electrical engineers that I don't know about?


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#2 2010-04-23 17:35:57

scio
Member
From: Buffalo, NY
Registered: 2008-08-05
Posts: 366

Re: Changing from 2048K to 2.0M not 1024K to 1.0M...

I believe that is to show greater precision for smaller values.
Below 2.0M, you might want to see 1070k instead of the rounded 1.0M.

Same goes for the meters, below 2A, you want higher precision, above, you are probably going to larger numbers.

However, I believe they are both just subjective numbers.

Offline

#3 2010-04-28 19:33:38

rransom
Member
Registered: 2010-04-26
Posts: 92

Re: Changing from 2048K to 2.0M not 1024K to 1.0M...

ConnorBehan wrote:

Just out of curiosity, why does pacman start using megabytes as the unit it displays during a download when the number of megabytes becomes greater than 2? If I were designing it I would've done this when the number became greater than 1.

It also reminds me of some ammeters and voltmeters which will show 3 decimal places while the first digit is 1 but only 2 decimal places when the first digit becomes 2. e.g. increasing current 1.789 A, 1.834 A, 1.929 A, 2.01 A, ...

Is this some inside joke among software engineers and electrical engineers that I don't know about?

If you hold the display of one of those physical *meters at just the right angle with respect to your light source, you can see all of its LCD segments, including the inactive ones -- and usually, the leading 1 is shown in a partial-digit display with only the two segments needed to indicate a 1, rather than the seven segments needed to show other digits.

I don't know why pacman reduces precision at 2048 kB; I've seen some other program (yum, perhaps?) reduce the precision of its progress indicators at 10000 kB (when they would otherwise need to show another digit).

Offline

Board footer

Powered by FluxBB