This is a beta testing release. Completely rewritten parser supports Grouping with parentheses Noninteger powers of numbers (3^0.2) Functions (log, ln, log2, sin, cos, tan, exp) which operate on any dimensionless argument (e.g. log(watts/horsepower)) Roots of units: sqrt(unit), cuberoot(unit), unit^(1|4), etc. Nonlinear units definitions can be specified in units.dat by giving functions that convert to and from linear units. This makes it possible to provide conversion between Fahrenheit and Celsius, one of the most requested features that is absent from version 1.55. Nonlinear units definitions can be specified by giving a list of points and using linear interpolation. Help feature to browse units database, '?' to list conformable units. Tester tasks Test portability (can you compile it?) Find bugs. Does the new parser always do what it should? Do the new features work as expected (e.g. intuitively)? Do the old features still work the way they used to? Is the documentation clear? Do you have any ideas on a better notation to use in units.dat for defining nonlinear units? The current notation is counterintuitive. (I know because I invented it and I find it bizarre myself. It is a notation suited to defining functions of units but not natural for defining new units.) Help! I noticed that if I use '?' to list conformable units and the list is long (so a pager is invoked), then if I quit out of the pager early I get the message "broken pipe" and units terminates. Can anybody tell me how to fix this? Can anybody supply portable code to determine the number of lines on the screen? New releases will be appearing at http://www.cam.cornell.edu/~adrian/units.html periodically. adrian@cam.cornell.edu ------------------------------------------------------------------ GNU `units' converts between different systems of units. It can handle multiplicative scale changes. It can also handle nonlinear conversions such as Celsius to Fahrenheit. General installation instructions appear in the file `INSTALL'. You should be able to run `./configure' followed by `make'. If you give no options to configure, it will compile units to look for the units data file in a standard location (probably /usr/local/share). If you try to use the program without installing you will need to use the `-f' option. If you don't want to commit to an installation location, you can invoke configure by typing `./configure -datadir='. Then no path name will be compiled into `units' and it will search your PATH environment variable to find the units data file. The documentation is available in texinfo, roff, and text format. The man page is generated automatically from the texinfo documentation. This man page produces readable results when run through nroff, but it should probably not be printed with troff or groff---no effort has been made to ensure that it prints out reasonably. To generate a printed manual, use `units.dvi' instead. This program has the following incompatibilties with unix `units': * Exponentiation in numbers requires an `e', so you must write 2.5e-2 instead of 2.5-2. * Prefixes are listed in the units file. * GNU `units' tries both the -s and -es plural forms. * The default output format is slightly different. * The units database is much larger and more informative, but with some differences. (e.g. `g' is for gravity in unix `units' and grams in GNU `units'.) The comment character has been changed to `#'. GNU `units' includes the following extensions: * Multiplication can be written with a `*' if desired. * Exponents can be written with '^' in units. * Exponents can be larger than 9 if written with `^'. * Sums of units can be converted. * The units data file is extensively commented. * Units which measure reciprocal dimensions can be converted. * Parentheses for grouping are supported. * Funtions such as sin, cos, and log are supported. * Roots of units can be computed. Possible things for the future: * Bundle up the units conversion stuff into a library. * Allow multiple -f options to load several files * Allow some way of having units like '$' that don't require a trailing space so you can write '$5'. This could be handled by having a command in the units database that specifies units which automatically get a space inserted after their name. * Have a metacommand in the units datafile that specifies how plurals should be tried for this file. This would allow expansion into other languages. (Of course, the real work of expanding into other languages is writing a units file that is appropriate for the language in question and includes local units. It's not just a translation task.) Another thing that could be accomplished here would be translation of English words like "cubic" and "per" into their symbolic meanings. A command in the units file could indicate that "per" should be substituted into a '/' and "cubic" means the cube the next unit. * Some kind of interface that gives the user a way to check and see what units are defined with some kind of interaction. Readline unitname completion is a bit unsatisfactory since it doesn't allow full substring searches, and it doesn't reproduce the annotations from the units data file. * Change database to store more information about units in a computer retriveable form. Acknowledgements This program owes a lot to Jeff Conrad who made many helpful suggestions, found numerous bugs, and helped me to find the definitions of obscure units. The documentation has greatly benefited from the suggestions made by Robert Chassell who kindly read several drafts. The following people have been particularly helpful in fixing portability problems: Kaveh Ghazi, Eric Backus, and Marcus Daniels. Bug reports and suggestions for improvements should be sent to the author: Adrian Mariano (adrian@cam.cornell.edu).