Re: error in sd.c

Guest section DW (dwguest@win.tue.nl)
Fri, 22 Jan 1999 12:00:34 +0100 (MET)


From koenig@alamak.tat.physik.uni-tuebingen.de Fri Jan 22 08:40:57 1999

Ha, Harald!

Did you try my aha1542? Was it any good?

> From: "Niki W. Waibel" <niki.waibel@gmx.net>
>
> ...
> The 2nd value is wrong!
> 8,715MB are 8.5GB - and not 8.7GB!!!
>
> We had this entire discussion a few weeks ago, and
> you can read all about it in the archives.

please read this thread again yourself and try to separate facts from advocacy...

Hmm. It is me who quotes the standards.

> You are wrong.
> 8715 MB is precisely 8.715 GB.

which gives absolutely no additional or relevant information when printing
both values with only shifting the decimal point

do you realize that in your example and kernel output it is

1 MB == 1024 * 1024
1 GB == 1024 * 1024 * 1000 == 1000 MB
^^^^

No, you are not willing to understand. Things are so simple:
1 M = 1000000. 1 G = 1000000000.
That is the SI norm. That is the IEEE norm as I learned recently.
That is what device manufacturers use. (Of course.)
That is what Windows uses if I understand people correctly.

In the good old days we sloppily said 1 kB when we really meant
1024 bytes. That was just a way of speaking. Because 1 is easier
to pronounce than 1024.

These days some people think that 1 k = 1024 is the truth,
and there are terrible confusions. But it is not the truth,
just a convenient approximation. 1 k = 1000.

With memory modules this is still convenient, so we continue
talking about 128 MB modules, well aware of the fact that these
have 2^27=134217728 bytes. With disks this is not convenient at all,
so there is no reason to defend this usage that never was very common.

Why do I say that this usage was uncommon?
For disks one often wants to know how many 1024-byte blocks there are.
So it happened that disks with 72 1024-byte blocks were called
72k disks. Disks became larger, and disks with 8000 1024-byte blocks
were called 8M disks. You see that here the usage is decimal,
but with a base unit that is 1024 bytes.
This is still what a lot of IBM software does.
And everyone knows that a 1.44MB floppy has 1.44*1024000 bytes.

Why do I insist? Unfortunately I maintain *fdisk, and I get about
two questions a week saying: Linux has a problem recognizing my
disk. Windows sees the full 10 GB but Linux only sees 9.3 GB.
You see, this sloppiness, out of convenience, from thirty years ago
has become very inconvenient, a source of confusion and discussion,
where some young people think that 1 M really means 1048576.

See also http://physics.nist.gov/cuu/Units/prefixes.html and
http://physics.nist.gov/cuu/Units/binary.html .

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/