Re: For American numbers

2005-02-14 Thread Scott David Daniels
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

Re: For American numbers

2005-02-14 Thread Neil Benn
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 ;-) N -- Neil Benn Senior Automation Engineer Cenix BioScience BioInnovations Zentrum Tatzberg 46 D-01307 Dresden Germany Tel : +49 (0)351 4173 154

Re: For American numbers

2005-02-14 Thread Peter Hansen
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 here I thought MiB meant "Men In Black"..

Re: For American numbers

2005-02-14 Thread Nick Coghlan
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

Re: For American numbers

2005-02-14 Thread Michael Hoffman
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 -- http://mail.python.org/mailman/listinfo/python

Re: For American numbers

2005-02-14 Thread Peter Maas
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 strai

Re: For American numbers

2005-02-13 Thread JanC
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 inst

Re: For American numbers

2005-02-13 Thread Dave Brueck
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. "kib

Re: For American numbers

2005-02-13 Thread Erik Max Francis
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 d

Re: For American numbers

2005-02-13 Thread Michael Hoffman
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 H

Re: For American numbers

2005-02-13 Thread Peter Hansen
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"

Re: For American numbers

2005-02-13 Thread Peter Hansen
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.wikipe

Re: For American numbers

2005-02-13 Thread Nick Coghlan
Mike Meyer wrote: From what I found 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'

Re: For American numbers

2005-02-13 Thread Mike Meyer
Nick Coghlan <[EMAIL PROTECTED]> 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 perfec

Re: For American numbers

2005-02-13 Thread Erik Max Francis
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 && [EMAIL P

Re: For American numbers

2005-02-13 Thread Jong dejongconsunet
Dan Bishop schreef: Nick Craig-Wood wrote: Peter Hansen <[EMAIL PROTECTED]> 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

Re: For American numbers

2005-02-13 Thread "Martin v. Löwis"
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 fort

Re: For American numbers

2005-02-13 Thread Roel Schroeven
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 '

Re: For American numbers

2005-02-13 Thread Alan Kennedy
[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(): m

Re: For American numbers

2005-02-13 Thread Peter Hansen
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 '

Re: For American numbers

2005-02-13 Thread Peter Hansen
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 '

Re: For American numbers

2005-02-13 Thread Dan Bishop
Nick Craig-Wood wrote: > Peter Hansen <[EMAIL PROTECTED]> 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 y

Re: For American numbers

2005-02-13 Thread Nick Craig-Wood
Peter Hansen <[EMAIL PROTECTED]> 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, wher

Re: For American numbers

2005-02-12 Thread Pierre Hanser
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').s

Re: For American numbers

2005-02-12 Thread Roel Schroeven
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').s

Re: For American numbers

2005-02-12 Thread Nick Coghlan
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 s

Re: For American numbers

2005-02-12 Thread Nick Coghlan
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.: b

Re: For American numbers

2005-02-12 Thread Peter Hansen
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():

Re: For American numbers

2005-02-12 Thread python
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').s