| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | .\" $NetBSD: units.1,v 1.16 2011/04/03 19:25:05 dholland Exp $ | | 1 | .\" $NetBSD: units.1,v 1.17 2011/04/03 19:44:15 dholland Exp $ |
2 | .Dd March 28, 2011 | | 2 | .Dd April 3, 2011 |
3 | .Dt UNITS 1 | | 3 | .Dt UNITS 1 |
4 | .Os | | 4 | .Os |
5 | .Sh NAME | | 5 | .Sh NAME |
6 | .Nm units | | 6 | .Nm units |
7 | .Nd conversion program | | 7 | .Nd conversion program |
8 | .Sh SYNOPSIS | | 8 | .Sh SYNOPSIS |
9 | .Nm | | 9 | .Nm |
10 | .Op Fl f Ar filename | | 10 | .Op Fl f Ar filename |
11 | .Op Fl qv | | 11 | .Op Fl qv |
12 | .Oo | | 12 | .Oo |
13 | .Op Ar count | | 13 | .Op Ar count |
14 | .Ar from-unit to-unit | | 14 | .Ar from-unit to-unit |
15 | .Oc | | 15 | .Oc |
| @@ -149,37 +149,60 @@ will not detect infinite loops that coul | | | @@ -149,37 +149,60 @@ will not detect infinite loops that coul |
149 | by careless unit definitions. | | 149 | by careless unit definitions. |
150 | .Pp | | 150 | .Pp |
151 | Prefixes are defined in the same way as standard units, but with | | 151 | Prefixes are defined in the same way as standard units, but with |
152 | a trailing dash at the end of the prefix name. | | 152 | a trailing dash at the end of the prefix name. |
153 | .Sh FILES | | 153 | .Sh FILES |
154 | .Bl -tag -width /usr/share/misc/units.lib -compact | | 154 | .Bl -tag -width /usr/share/misc/units.lib -compact |
155 | .It Pa /usr/share/misc/units.lib | | 155 | .It Pa /usr/share/misc/units.lib |
156 | the standard units library | | 156 | the standard units library |
157 | .El | | 157 | .El |
158 | .Sh AUTHORS | | 158 | .Sh AUTHORS |
159 | .An Adrian Mariano Aq adrian@cam.cornell.edu | | 159 | .An Adrian Mariano Aq adrian@cam.cornell.edu |
160 | or | | 160 | or |
161 | .Aq mariano@geom.umn.edu | | 161 | .Aq mariano@geom.umn.edu |
| | | 162 | .Sh CAVEATS |
| | | 163 | While |
| | | 164 | .Nm |
| | | 165 | can be used as a calculator for many unit-related computations, |
| | | 166 | caution is required: many computations require additional constant |
| | | 167 | factors deriving from the physics (or chemistry or whatever) of the |
| | | 168 | situation. |
| | | 169 | As these factors are dimensionless, |
| | | 170 | .Nm |
| | | 171 | cannot itself either provide them or warn the user when they have been |
| | | 172 | forgotten. |
| | | 173 | For example, one joule is one kilogram meter squared per second |
| | | 174 | squared, by definition; however, the kinetic energy of a one-kilogram |
| | | 175 | object moving at one meter per second is half a joule, not one joule, |
| | | 176 | because of a dimensionless factor that arises from integration. |
| | | 177 | .Pp |
| | | 178 | Also, some pairs of units that have the same dimensionality are |
| | | 179 | nonetheless used to measure different things and attempting to convert |
| | | 180 | between them may require additional fudge factors or be entirely |
| | | 181 | meaningless. |
| | | 182 | For example, torque and energy have the same dimensionality, but |
| | | 183 | attempting to convert torque in newton-meters to energy in joules is |
| | | 184 | nonsensical. |
| | | 185 | There is no practical way for |
| | | 186 | .Nm |
| | | 187 | to warn about these issues either. |
162 | .Sh BUGS | | 188 | .Sh BUGS |
163 | The effect of including a | | 189 | The effect of including a |
164 | .Sq \&/ | | 190 | .Sq \&/ |
165 | in a prefix is surprising. | | 191 | in a prefix is surprising. |
166 | .Pp | | 192 | .Pp |
167 | Exponents entered by the user can be only one digit. | | 193 | Exponents entered by the user can be only one digit. |
168 | You can work around this by multiplying several terms. | | 194 | You can work around this by multiplying several terms. |
169 | .Pp | | 195 | .Pp |
170 | The user must use | | 196 | The user must use |
171 | .Sq \&| | | 197 | .Sq \&| |
172 | to indicate division of numbers and | | 198 | to indicate division of numbers and |
173 | .Sq \&/ | | 199 | .Sq \&/ |
174 | to indicate division of symbols. | | 200 | to indicate division of symbols. |
175 | This distinction should not be necessary. | | 201 | This distinction should not be necessary. |
176 | .Pp | | 202 | .Pp |
177 | The program contains various arbitrary limits on the length | | 203 | The program contains various arbitrary limits on the length |
178 | of the units converted and on the length of the data file. | | 204 | of the units converted and on the length of the data file. |
179 | .Pp | | 205 | .Pp |
180 | The program should use a hash table to store units so that | | 206 | The program should use a hash table to store units so that |
181 | it doesn't take so long to load the units list and check | | 207 | it doesn't take so long to load the units list and check |
182 | for duplication. | | 208 | for duplication. |
183 | .Pp | | | |
184 | The program should warn users when they're trying to perform a conversion | | | |
185 | that doesn't make sense, since there are many such combinations. | | | |