By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,209 Members | 1,706 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,209 IT Pros & Developers. It's quick & easy.

For American numbers

P: n/a
Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
magnitude /= 1000.
if magnitude < 1000.:
break
elif magnitude < 1:
for prefix in ('milli micro nano pico femto '
'atto zepto yocto'.split():
magnitude *= 1000.
if magnitude >= 1.0:
break
if magnitude < .001:
return 'zero %s' % units
else:
prefix = ''
if value < 0:
return '-%.3f %s%s' % (magnitude, prefix, units)
return '%.3f %s%s' % (magnitude, prefix, units)

--Scott David Daniels
Sc***********@Acm.Org

Jul 18 '05 #1
Share this Question
Share on Google+
29 Replies


P: n/a

Scott David Daniels wrote:
Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
magnitude /= 1000.
if magnitude < 1000.:
break
elif magnitude < 1:
for prefix in ('milli micro nano pico femto '
'atto zepto yocto'.split():
magnitude *= 1000.
if magnitude >= 1.0:
break
if magnitude < .001:
return 'zero %s' % units
else:
prefix = ''
if value < 0:
return '-%.3f %s%s' % (magnitude, prefix, units)
return '%.3f %s%s' % (magnitude, prefix, units)

--Scott David Daniels
Sc***********@Acm.Org


Jul 18 '05 #2

P: n/a
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
magnitude /= 1000.
if magnitude < 1000.:
break


Only for hard drive manufacturers, perhaps.

For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...

-Peter
Jul 18 '05 #3

P: n/a
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in :
magnitude /= 1000.
if magnitude < 1000.:
break
elif magnitude < 1:
for prefix in :
magnitude *= 1000.
if magnitude >= 1.0:
break
if magnitude < .001:
return 'zero %s' % units
else:
prefix = ''
if value < 0:
return '-%.3f %s%s' % (magnitude, prefix, units)
return '%.3f %s%s' % (magnitude, prefix, units)

--Scott David Daniels
Sc***********@Acm.Org


Because I can't resist generalising this. . .

def units(value, units='bytes', base=1000.0,
super_prefixes = ('kilo mega giga tera peta '

'exa zetta yotta').split(),
sub_prefixes = ('milli micro nano pico femto '
'atto zepto yocto').split()):
magnitude = abs(value)
if magnitude >= base:
for prefix in super_prefixes:
magnitude /= base
if magnitude < base:
break
elif magnitude < 1.0:
for prefix in sub_prefixes:
magnitude *= base
if magnitude >= 1.0:
break
if not sub_prefixes or magnitude < .001:
return 'zero %s' % units
else:
prefix = ''
if value < 0:
return '-%.3f %s%s' % (magnitude, prefix, units)
return '%.3f %s%s' % (magnitude, prefix, units)

def bytecount(value):
# Should check if these prefixes are right. . .
return units(value, 'bytes', 1024.0,
'kibi mebi gibi tebi pebi ebi zebi yobi'.split(), [])

Py> for i in range(1, 28, 3):
.... print units(10**i)
.... print bytecount(10**i)
....
10.000 bytes
10.000 bytes
10.000 kilobytes
9.766 kibibytes
10.000 megabytes
9.537 mebibytes
10.000 gigabytes
9.313 gibibytes
10.000 terabytes
9.095 tebibytes
10.000 petabytes
8.882 pebibytes
10.000 exabytes
8.674 ebibytes
10.000 zettabytes
8.470 zebibytes
10.000 yottabytes
8.272 yobibytes

Cheers,
Nick.

--
Nick Coghlan | nc******@email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
Jul 18 '05 #4

P: n/a
Peter Hansen wrote:
Only for hard drive manufacturers, perhaps.

For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...


Given that there are perfectly good ISO prefixes for the multiples of 2**10, I
don't see any reason to continue misusing the 10**3 prefixes for the purpose.

It may be an uphill slog, but the fact that the CS usage is ambiguous at best,
and just plain wrong at worst, gives me hope :)

The hard drive guys are just leading the charge because it makes for better
marketing copy. . .

Cheers,
Nick.

--
Nick Coghlan | nc******@email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
Jul 18 '05 #5

P: n/a
Peter Hansen wrote:
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
magnitude /= 1000.
if magnitude < 1000.:
break

Only for hard drive manufacturers, perhaps.


And physicists and chemists and engineers and all other kinds of
scientists all over the world. Plus those of us in the computer world
who agree that 'kilo == 1024' is an abomination that should never have
existed and which we should get rid of as fast as possible.

As fast as possible is not very fast, unfortunately.

--
"Codito ergo sum"
Roel Schroeven
Jul 18 '05 #6

P: n/a
Peter Hansen wrote:
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
magnitude /= 1000.
if magnitude < 1000.:
break

Only for hard drive manufacturers, perhaps.

For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...

-Peter

even for cpu frequency?
Jul 18 '05 #7

P: n/a
Peter Hansen <pe***@engcorp.com> wrote:
Only for hard drive manufacturers, perhaps.

For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...


Yes. Unless you work in the telcoms industry, where, for example if
you order a 2 Mbit/s line you'll get

2 * 1024 * 1000 bits / s

;-)
--
Nick Craig-Wood <ni**@craig-wood.com> -- http://www.craig-wood.com/nick
Jul 18 '05 #8

P: n/a
Nick Craig-Wood wrote:
Peter Hansen <pe***@engcorp.com> wrote:
Only for hard drive manufacturers, perhaps.

For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...


Yes. Unless you work in the telcoms industry, where, for example if
you order a 2 Mbit/s line you'll get

2 * 1024 * 1000 bits / s


They must have gotten the idea from floppy disks, which also use a
1024000-byte "megabyte".

Jul 18 '05 #9

P: n/a
Roel Schroeven wrote:
Peter Hansen wrote:
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
magnitude /= 1000.
if magnitude < 1000.:
break


Only for hard drive manufacturers, perhaps.

And physicists and chemists and engineers and all other kinds of
scientists all over the world. Plus those of us in the computer world
who agree that 'kilo == 1024' is an abomination that should never have
existed and which we should get rid of as fast as possible.


Physicists and chemists (and most engineers) don't go around
talking about "kilobytes" all that often, and when they do
it's generally unimportant whether they mean 1000 or 1024.

Given the clear "units='bytes'" default above, and my restricting
my comments to "the rest of the computer world", it should be
clear I was talking about a very limited subset of the planet.

A subset, however, which has an extremely strong attachment to
1024 instead of 1000 (for very good reasons), and which is
less likely to abandon backwards compatibility and widely accept
1000 than the US is likely to adopt metric widely in the near
future...

-Peter
Jul 18 '05 #10

P: n/a
Pierre Hanser wrote:
Peter Hansen wrote:
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
magnitude /= 1000.
if magnitude < 1000.:
break


Only for hard drive manufacturers, perhaps.

For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...


even for cpu frequency?


I don't think so. But who cares? CPU frequency, apart
from being fairly meaningless anyway, doesn't cover
enough ground for anyone to need a routine like the
above to deal with it.

Anyway, I was focusing on the "units='bytes'" part above
which suggested a byte-oriented focus for the routine,
and CPU frequencies aren't measured in bytes...

-Peter
Jul 18 '05 #11

P: n/a
[Scott David Daniels]
Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
magnitude /= 1000.
if magnitude < 1000.:
break


[Peter Hansen] Only for hard drive manufacturers, perhaps.

For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...


Maybe you missed these?

http://en.wikipedia.org/wiki/Kibibyte
http://en.wikipedia.org/wiki/Mebibyte
http://en.wikipedia.org/wiki/Gibibyte

kilo-mega-giga-etc-should-be-powers-of-10-ly y'rs,

--
alan kennedy
------------------------------------------------------
email alan: http://xhaus.com/contact/alan
Jul 18 '05 #12

P: n/a
Peter Hansen wrote:
Roel Schroeven wrote:
Peter Hansen wrote:
Scott David Daniels wrote:

Kind of fun exercise (no good for British English).

def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
magnitude /= 1000.
if magnitude < 1000.:
break


Only for hard drive manufacturers, perhaps.
And physicists and chemists and engineers and all other kinds of
scientists all over the world. Plus those of us in the computer world
who agree that 'kilo == 1024' is an abomination that should never have
existed and which we should get rid of as fast as possible.

Physicists and chemists (and most engineers) don't go around
talking about "kilobytes" all that often, and when they do
it's generally unimportant whether they mean 1000 or 1024.


Scientists and engineers use kilo as a prefix for all kinds of units,
and it means 1000 regardless of what unit it is used with. Except when
used with bytes and some other units, and I feel that that is a
historical misfeature.
Given the clear "units='bytes'" default above, and my restricting
my comments to "the rest of the computer world", it should be
clear I was talking about a very limited subset of the planet.
"units='bytes'" means that 'bytes' is the default, but also that the
function can be called with any other unit.
A subset, however, which has an extremely strong attachment to
1024 instead of 1000 (for very good reasons),
Well, in computer science 1024 is often more practical than 1000, I'm
not going to argue that. My point is that 1024 is not 1000 (though it is
quite close, unfortunately), so another prefix should have been chosen
to represent it. I don't mind interchanging 1000 and 1024 in informal
contexts, but I think a clear distinction is needed in other cases:

- the difference between 1000 and 1024 is only 2.4%, but the difference
between 1 GB and 1GiB is 7.4. That can IMO no longer be looked at as
insignificant.
- computer scientists are used to having everyting just right. We're
used to compilers that cannot deal with the slightest typo, TCP doesn't
work right if we're ACKing the wrong sequence numbers. In the view of
that, it feels ackward that we're so sloppy with unit prefixes.

History has tought is that standardization is a good thing, and I think
we should start using the existing standard (SI) as it is inteded to be
used: k as a prefix equals 1000, regardless of the context. I agree that
'kibi', 'mebi' and 'gibi' sound silly, but I think it's better to use
silly sounding units than units of which you can never be really sure
what they mean.
less likely to abandon backwards compatibility and widely accept
1000 than the US is likely to adopt metric widely in the near
future...


I'm afraid you're right, but I think we should at least try.

In fact, I don't really understand that: computer science is a modern
science, computers and other digital devices are modern stuff, but still
the computer world is super tradionalist about this. The worst part is
that it's a tradition we invented ourselves which is in contradiction
with an older, commonly accepted tradition.

--
"Codito ergo sum"
Roel Schroeven
Jul 18 '05 #13

P: n/a
Peter Hansen wrote:
For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...


In case this isn't clear yet: you have missed a changing
of the guard or something. "kibi" is 1024, "mebi" is
1024*1024 and so forth. "kilo" is 1000.

Regards,
Martin
Jul 18 '05 #14

P: n/a
Dan Bishop schreef:
Nick Craig-Wood wrote:
Peter Hansen <pe***@engcorp.com> wrote:
Only for hard drive manufacturers, perhaps.

For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...


Yes. Unless you work in the telcoms industry, where, for example if
you order a 2 Mbit/s line you'll get

2 * 1024 * 1000 bits / s

They must have gotten the idea from floppy disks, which also use a
1024000-byte "megabyte".


Not really. It is actually related to the bandwidth of individual
telephony speech connections. These channels have a bandwith
of 64 kb/sec, where the k-prefix is used in the proper (SI) way.
So this bandwidth really is exactly 64,000 bits/sec
(8,000 samples/sec, each sample having 8 bits).
The M in a 2Mb/s connection is neither an SI prefix,
noris it identical to Mi. It's just sloppy language.
A 2 Mb/s connection is just a bundling of 32 such 64 kb/s channels,
resulting in a bandwidth of 32*64,000 = 2,048,000 bits/sec.

Cheers,

Ruud
Jul 18 '05 #15

P: n/a
Dan Bishop wrote:
They must have gotten the idea from floppy disks, which also use a
1024000-byte "megabyte".


It's pretty common industry-wide. Memory is measured in binary prefixes
(x 1024), but disk space and bandwidth are measured in decimal prefixes
(x 1000).

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
I'm not worried about anything. I'm not fearing any man.
-- Dr. Martin Luther King, Jr.
Jul 18 '05 #16

P: n/a
Nick Coghlan <nc******@iinet.net.au> writes:
Peter Hansen wrote:
Only for hard drive manufacturers, perhaps.
For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...
Given that there are perfectly good ISO prefixes for the multiples of
2**10, I don't see any reason to continue misusing the 10**3 prefixes
for the purpose.


From what I found <URL: http://physics.nist.gov/cuu/Units/binary.html, it's not clear those are ISO prefixes yet - but they have been

adapted by some standards agencies.

Possibly you have better references?

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Jul 18 '05 #17

P: n/a
Mike Meyer wrote:
From what I found <URL: http://physics.nist.gov/cuu/Units/binary.html

, it's not clear those are ISO prefixes yet - but they have been


adapted by some standards agencies.

Possibly you have better references?


My mistake - IEC, not ISO :)

And I did get one wrong in my sample code - it's 'exbi' not 'ebi':
http://en.wikipedia.org/wiki/Binary_...ndard_prefixes

Cheers,
Nick.

--
Nick Coghlan | nc******@email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
Jul 18 '05 #18

P: n/a
Alan Kennedy wrote:
[Peter Hansen]
For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...
Maybe you missed these?

http://en.wikipedia.org/wiki/Kibibyte
http://en.wikipedia.org/wiki/Mebibyte
http://en.wikipedia.org/wiki/Gibibyte


Definitely missed them, in the sense of "didn't see them
yet". I must say I'm somewhat astounded that anyone
bothered to do this.

Don't miss them at all, in the sense of "have no plans
to use them and am not stressed in the least over the fact
that they are lacking in my life."
kilo-mega-giga-etc-should-be-powers-of-10-ly y'rs,


Maybe, but they aren't always... that's just the way
it is.

I take a descriptive view rather than a prescriptive one.
Google for the usage of the above and you'll find the
following ratios for the numbers of pages that use
the two forms:

kibibyte vs. kilobyte: 1:60 (impressively high, I admit)
mebibyte vs. megabyte: 1:234
gibibyte vs. gigabyte: 1:2082

I strongly suspect that the vast majority of the former
set of pages are of the form "use this instead of kilo!",
but perhaps I really have been asleep while much of the
computing world converted.

I'll be one of the last holdouts, too... it's really not
so hard to work in powers of two if you try...

-Peter
Jul 18 '05 #19

P: n/a
Martin v. Löwis wrote:
Peter Hansen wrote:
For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...

In case this isn't clear yet: you have missed a changing
of the guard or something. "kibi" is 1024, "mebi" is
1024*1024 and so forth. "kilo" is 1000.


Yeah, saw the link. The IEC doesn't speak for me, I'm afraid.
And as the wikipedia notes, "As of 2005 this naming convention
has not gained widespread use."

I suspect I and many others will go to our graves not being
comfortable mebbling and gibbling over our bytes, though
we'll probably spend a lot of time kibbling over the issue...

-Peter
Jul 18 '05 #20

P: n/a
Peter Hansen wrote:
I'll be one of the last holdouts, too... it's really not
so hard to work in powers of two if you try...


The difficulty isn't with working in powers of 1024, it's that the terms
are used inconsistently even within the computing industry. Memory is
measured in kibibytes, but disk space is measured in kilobytes.
Something as basic as "1 meg" has different numeric meanings depending
on whether you're talking about memory or disk space or metered
bandwidth usage. And a 1.44 MB isn't 1000^2 bytes or 1024^2 bytes, but
rather 1024*1000 bytes!

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
The decree is the Sultan's; the mountains are ours.
-- Dadaloglu
Jul 18 '05 #21

P: n/a
Nick Coghlan wrote:
My mistake - IEC, not ISO :)


For all intents and purposes an IEC standard should be as good as an
ISO one. They usually develop standards for different areas, or jointly
if it is an overlapping area (but ISO/IEC standards are usually referred
to as "ISO standards").
--
Michael Hoffman
Jul 18 '05 #22

P: n/a
Peter Hansen schreef:
Given the clear "units='bytes'" default above, and my restricting
my comments to "the rest of the computer world", it should be
clear I was talking about a very limited subset of the planet.

A subset, however, which has an extremely strong attachment to
1024 instead of 1000 (for very good reasons), and which is
less likely to abandon backwards compatibility and widely accept
1000 than the US is likely to adopt metric widely in the near
future...


The problem is that that 'subset' uses kilo for both 1000 (at least hard
disks & some network transmission speeds) and 1024 in computer science.
--
JanC

"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9
Jul 18 '05 #23

P: n/a
Peter Hansen wrote:
Martin v. Löwis wrote:
Peter Hansen wrote:
For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...


In case this isn't clear yet: you have missed a changing
of the guard or something. "kibi" is 1024, "mebi" is
1024*1024 and so forth. "kilo" is 1000.


Yeah, saw the link. The IEC doesn't speak for me, I'm afraid.
And as the wikipedia notes, "As of 2005 this naming convention
has not gained widespread use."

I suspect I and many others will go to our graves not being
comfortable mebbling and gibbling over our bytes, though
we'll probably spend a lot of time kibbling over the issue...


Indeed - it's a little early to say that we've missed a changing of the guard! :)

Multiple definitions aside, "kilo" and "mega" are far too entrenched - even if I
could manage to say "kibibyte" with a straight face, I'd get nothing but blank
stares in return.

-Dave
Jul 18 '05 #24

P: n/a
Dave Brueck schrieb:
Multiple definitions aside, "kilo" and "mega" are far too entrenched -
even if I could manage to say "kibibyte" with a straight face, I'd get
nothing but blank stares in return.


This kibi-mebi thing will probably fail because very few can manage
to say "kibibyte" with a straight face :)

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
Jul 18 '05 #25

P: n/a
Peter Maas wrote:
This kibi-mebi thing will probably fail because very few can manage
to say "kibibyte" with a straight face :)


I agree, I can't do it yet. I can write kiB and MiB though with a
straight face, and find that useful.
--
Michael Hoffman
Jul 18 '05 #26

P: n/a
Michael Hoffman wrote:
Peter Maas wrote:
This kibi-mebi thing will probably fail because very few can manage
to say "kibibyte" with a straight face :)

I agree, I can't do it yet. I can write kiB and MiB though with a
straight face, and find that useful.


And written communication is where avoiding the ambiguity tends to matter more -
in a conversation, if the difference actually matter, you can just ask. With a
written document, requesting clarification often isn't so simple.

Cheers,
Nick.

--
Nick Coghlan | nc******@email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
Jul 18 '05 #27

P: n/a
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).

<snip>


what's American about it? If anything, it's more French than American ;-)

N

--

Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 46
D-01307
Dresden
Germany

Tel : +49 (0)351 4173 154
e-mail : be**@cenix-bioscience.com
Cenix Website : http://www.cenix-bioscience.com

Jul 18 '05 #28

P: n/a
On Mon, 14 Feb 2005 09:47:30 +0000, Michael Hoffman
<ca*******@mh391.invalid> declaimed the following in comp.lang.python:
Peter Maas wrote:
This kibi-mebi thing will probably fail because very few can manage
to say "kibibyte" with a straight face :)
I agree, I can't do it yet. I can write kiB and MiB though with a
straight face, and find that useful.


"kibibyte" sounds too much like pet food... "Kibbles and Bits"
anyone...

OTOH, "MiB" has been poisoned by association with a certain Will
Smith movie (or two)... "Men in Black"...

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 18 '05 #29

P: n/a
Neil Benn wrote:
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).

what's American about it? If anything, it's more French than American ;-)


Well, actually this started with scaling integers, and I was worried
about a billion / billionth (and up / down). In mid-task I switched
to ISO prefix without bothering to update my mental state. So I
warned about a problem that a former version of this code had. As I
hit send, I realized my stupidity, but figured I was better off not
wasting more bandwidth (which I now have done). If I had it to do
over again, I'd have made the default unit something like meters --
again non-British, and it avoids the issue of 1024 / 1000 altogether.

grinning-stupidly,

Scott David Daniels
Sc***********@Acm.Org

Jul 18 '05 #30

This discussion thread is closed

Replies have been disabled for this discussion.