Bug#629926: Temperature units are not correctly converted
Package: units Version: 1.87-2 Severity: normal Hi, After reading http://thedailywtf.com/Articles/A-Really-Cold-Winter.aspx, I wanted to see just how far away from absolute zero that is, so I tried using units: You have: -459 degF You want: kelvin * -255 / -0.0039215686 Kelvin is supposed to be a unit that can't go negative. Also, the absolute zero, in degrees Fahrenheit, is supposed to be -459.67. You have: -459degF You want: degC * -255 / -0.0039215686 You have: -273 degC You want: degF * -491.4 / -0.002035002 Seems there's more going on, here. -- System Information: Debian Release: wheezy/sid APT prefers oldstable APT policy: (500, 'oldstable'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.39-1-amd64 (SMP w/2 CPU cores) Locale: LANG=nl_BE.UTF-8, LC_CTYPE=nl_BE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages units depends on: ii dpkg 1.16.0.3 Debian package management system ii install-info 4.13a.dfsg.1-6 Manage installed documentation in ii libc6 2.13-5 Embedded GNU C Library: Shared lib ii libncurses5 5.9-1 shared libraries for terminal hand ii libreadline5 5.2-8 GNU readline and history libraries units recommends no packages. units suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#629926: Temperature units are not correctly converted
From the man page: Nonlinear units are represented using functional notation. They make possible nonlinear unit conversions such temperature. This is different from the linear units that convert temperature differences. Note the difference below. The absolute temperature conversions are handled by units starting with `temp', and you must use functional notation. The temperature differences are done using units starting with `deg' and they do not require functional notation. You have: tempF(45) You want: tempC 7.222 You have: 45 degF You want: degC * 25 / 0.04 Think of `tempF(x)' not as a function but as a notation which indicates that `x' should have units of `tempF' attached to it. See Nonlinear units. The first conversion shows that if it's 45 degrees Fahrehneit outside it's 7.2 degrees Celsius. The second conversions indicates that a change of 45 degrees Fahrenheit corresponds to a change of 25 degrees Celsius. However: You have: tempF(-459.67) You want: tempC -273.15 You have: tempF(-459.67) You want: tempK * -5.6843419e-14 / -1.7592186e+13 You have: tempC(-273.15) You want: tempK * 0 / inf The temperature function appears not to work for Kelvin: a bug. I'll send it upstream. -- John Hasler jhas...@newsguy.com Elmwood, WI USA -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org