Bug 34617

Summary: /usr/bin/units mangles temperature conversion
Product: Base System Reporter: Ed Symanzik <zik>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Ed Symanzik 2002-02-04 19:50:01 UTC
units results for temperature conversions is incorrect. 
units will not accept non-positive numbers.

The problem is that temperature scales do not intersect
at zero.  There should be a way to note this in units.lib.

Perhaps
  degC  K +273
  degF  5|9 degC +32

How-To-Repeat: > units
497 units, 54 prefixes
You have: 20 degC
You want: K
	* 20
	/ 0.05
You have: 32 degF
You want: degC
	* 17.777778
	/ 0.05625
You have: 0 degF
units: unit reduces to zero
You have: -9 degC
unknown unit '-'
Comment 1 greid freebsd_committer freebsd_triage 2002-02-04 22:49:30 UTC
State Changed
From-To: open->closed

This is expected behaviour.  From units(1): 

The units program converts quantities expressed in various scales to 
their equivalents in other scales.  The units program can only handle 
multiplicative scale changes.  It cannot convert Celsius to Fahrenheit, 
for example.
Comment 2 Ed Symanzik 2002-02-05 13:14:58 UTC
I looked right over that.  I was expecting a notice like
that to appear in the Bugs section.