From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 Fedora/1.7.12-1.5.1 Description of problem: The units program doesn't correctly convert between bytes, kilobytes, megabytes, gigabytes, etc (or kilobits &c. for that matter.) Here's output from my units program. 2084 units, 71 prefixes, 32 nonlinear units You have: 1024 kilobytes You want: megabytes * 1.024 / 0.9765625 You have: 5000 megabytes You want: gigabytes * 5 / 0.2 You have: 1024 kilobits You want: megabits * 1.024 / 0.9765625 You have: 5000 megabits You want: gigabits * 5 / 0.2 Version-Release number of selected component (if applicable): units-1.80-12 How reproducible: Always Steps to Reproduce: 1. start units 2. try converting bit/byte units Actual Results: It gives the wrong answer! Expected Results: It should give the right answer (sorry not a math person.) Additional info:
kibi- 2^10 # In response to the convention of illegally mebi- 2^20 # and confusingly using metric prefixes for gibi- 2^30 # powers of two, the International tebi- 2^40 # Electrotechnical Commission aproved these pebi- 2^50 # binary prefixes for use in 1998. If you exbi- 2^60 # want to refer to "megabytes" using the Ki- kibi # binary definition, use these prefixes. $ units You have: 1024 kibits You want: mebits * 1 / 1
$ units 2438 units, 71 prefixes, 32 nonlinear units You have: 5000 MiB You want: GiB * 4.8828125 / 0.2048 You have: 5000 MiB You want: bits * 4.194304e+10 / 2.3841858e-11 You have: 1 KiB You want: bits * 8192 / 0.00012207031