Convert - unit conversions and physical constants for the hp 39g+ graphical calculator

Introduction

One feature that Hewlett-Packard left out of the hp39g+ calculator was unit conversions and physical constants. Aplet Convert allows conversion between a wide range of metric and imperial units, over one thousand different combinations, and also includes a number of commonly used physical constants.


Unit conversions on the hp 39g+ Graphing Calculator

Unfortunately there seems to be no way within the hp39g+'s programming language to read a value from the home screen or return a value directly to home. This is one situation where the old style of 'keystroke programmable' calculators had an advantage.
Instead Convert uses the variable q to store a conversion factor which the quantity to be converted should be multiplied by to obtain the new units. The same conversion can be performed on another value just by multiplying by q again.
Since Convert is derived from the Polar aplet, q is available directly from the X/T/q key.

Units are grouped by type (length, area, power etc.) so there is no chance of a meaningless conversion, such as feet to joules.


Loading Convert

Convert is an aplet with several linked programs and should be transferred to the hp39g+ in the usual way, i.e.:

  • Put the files HP39DIR.000, HP39DIR.CUR, CONVARE0.000, CONVCON0.000, CONVENG0.000, CONVERT0.000, CONVFOR0.000, CONVLEN0.000, CONVMAS0.000, CONVPOW0.000, CONVPRE0.000, CONVS000.000, CONVSPE0.000, CONVSV00.000, CONVTEM0.000 and CONVVOL0.000 from this zip file to an empty directory on a PC. (The .htm and .gif files can be left in - they will be ignored by the calculator.)
  • Connect to calulator to the computer via the USB cable then start the HP39G Connectivity program and point it to the directory holding the files.
  • Go to the APLET catalog on the calculator, choose RECV and transfer Convert from the computer to the hp 39g+'s memory by selecting Convert as the file to download.
The other files are linked as part of the aplet and should automatically transfer into the PROGRAM catalog.

If you are typing in the program by hand (not recommended since it would be easy to mistype the conversion values), start by saving a copy of the Polar aplet, named Convert, then type in each of the programs listed at the end of this help file with the names shown into the Program catalog. The instructions text shown below will also need to be typed into Convet's note.


Deleting Convert

Delete Convert from the APLET catalog. The helper programs then need to be individually deleted from the PROGRAM catalog. For easy identification the files all have names of the form .Conv.XXX.


Setting up Convert

If you have transferred Convert directly from a PC its VIEWS menu will already be set and this stage can be ignored.
If however you have typed in the programs rather than transferring them from PC, then before Convert can be run the first time its VIEWS menu needs to be defined.
IMPORTANT - Begin by changing to the APLET catalog, highlight Convert, and select START. This makes Convert the current aplet as shown at the top of the home screen. Now go to the PROGRAM catalog, find the program named .Conv.SV and RUN it. The views menu is now configured and there is no need to repeat this step (unless you edit the programs to add or remove conversion types).


Running Convert

Before beginning to use Convert or after using a different aplet, START Convert from the calculator's aplet catalog. This brings up a text note with brief instructions on usage, as shown below:

Press VIEWS
 Select unit type
  Choose 'from' units
  Choose 'to' units
Conversion factor is in q (X,T,q key).
Temperatures:
 Store value in q
 Choose 'from' & 'to'
Converted value in q
Constants:
  Choose constant
Value in q
Pressing HOME or changing to another screen will remove this message.

Convert is meant to be used from the home screen. The general sequence of operations is:

  • Type in the value to be converted.
  • Type ×q
  • Press VIEWS.
  • From the menu highlight the type of units to convert.
  • From the next menu select the units to convert 'from' (i.e. the current units for the value entered.)
  • Next choose the units to convert 'to' (i.e. the units you want the value in.)
  • This will return you to the home screen and pressing ENTER will perform the conversion.

This should become clear with an example.

Suppose you want to convert 12 inches to millimetres.

  • In the home screen type "12*q"
    Using theta in a unit conversion
  • Press VIEWS
    This brings up the display:
    Convert VIEWS menu
  • Move the highlight bar to the type of unit to be converted (Length in this case) using the up & down cursor keys or by pressing the first letter of the name, then select OK.
  • This brings up the length conversions menu. Scroll down to inch (the unit to convert from):
    Selecting inches as the unit to convert from
  • Press OK (or the ENTER button) and then highlight the unit to convert to (millimetre in this example):
    Selecting millimetres as the unit to convert to
  • Press OK to select millimetres. This will return you to the home screen as it was before but the conversion factor from inches to millimetres is now stored in variable q. Pressing ENTER completes the calculation:
    12 inches converted to 304.9 millimetres
Thus 12 inches equals 304.8 millimetres.

Remember that the last used conversion factor is still stored in q so to convert another value in inches to millimetres there is no need to go through the menus again; just multiply by q.
E.g. what is 65 inches in millimetres? Type in 65*q ENTER
Using the stored conversion factor to perform another conversion

65 inches is 1651 millimetres.

Whenever any of the Convert menus are displayed, pressing CANCEL (softkey 5) will exit Convert and return you to the previous screen, but the value stored in q is uncertain and should not be used.


Converting Temperatures

Temperature conversions are a bit more complicated because it is not possible to use a simple conversion factor. Different scales have different zero points so there is an addition or subtraction step as well.
To perform a temperature conversion, first store the value to be converted into q, then choose the units to convert from and to, and finally recall the (converted) value of q. E.g.:

To convert 25 degrees Celsius to Kelvins:

  • Store 25 into q:
    Store 25 Celsius in theta
  • Press VIEWS to bring up the conversions menu and scroll down to Temperature:
    Choose temperature conversions
  • Press OK and choose the units to convert from, i.e °Celsius:
    Convert from Celsius
  • Press OK and choose the units to convert to, i.e Kelvins:
    Convert to Kelvins
  • Press OK then back in the home screen display the new value of q:
    Theta = 298.15 Kelvins
So 25 °Celsius = 298.15 Kelvins.


Accessing the Physical Constants

Physical constants are used in a similar way, via the variable q, except there is only one choosing step.
From the VIEWS menu select Constants by pressing the letter C or the cursor up button, scroll down to the constant you want, and press OK. Its value is now stored in variable q and can be used in expressions on the home screen.
The constants are shown by their usual symbol followed by a brief description, and all are in S.I. units (kilograms, metres, seconds, Joules, Kelvins, Watts, Coulombs etc.) E.g.:

What is the mean thermal kinetic energy of a gas molecule at a temperature of 800 Kelvins?
The equation is Energy = (3/2) kT where k is the Boltzmann constant and T is the absolute temperature in Kelvins.

  • Press VIEWS then C to move directly to Constants:
    Selecting physical constants
  • Press OK to bring up the list of physical constants and scroll down or press the letter K to move to k  Boltzmann:
    Choose Boltzmann constant
  • Press OK or ENTER and you are returned to the home screen with the value of the Boltzmann constant stored in variable q.
  • You can display the current value of q, showing that the Boltzmann constant = 1.380658 x 10-23 (in Joules/Kelvin), or use it in an expression by entering
    3/2*q*800
    which gives the kinetic energy of the molecule as 1.6567896 x 10-20 Joules:
    Using the constant stored in theta in an expression
The constant of course remains in q and can be used again until q is changed.

Within each conversion group the units are listed in a reasonably consistent order, i.e. metric units, then imperial units, then less common or specialist units.

Note: the keys SYMB, PLOT and NUM do not do anything useful in aplet Convert.


Accuracy

Conversion factors are taken from reliable and cross-checked sources and are stored to six significant figures, so should be accurate to within a few parts per million.
Physical constants are stored to eight significant figures where available.
There are some instances where different sources give slightly varying values for the constants (which mostly have to be measured experimentally and are thus subject to some uncertainty), but they only differ in the last one or two digits.


Hardware Requirements

Convert runs on a Hewlett-Packard 39g+ calculator. It should also work on the 39g, 39gs and 40gs, and may work on the 38g, 48g, 49g and 50g but has not been tried. The 48 series onwards already has some conversions and constants built in anyway.

The aplet and associated programs take up 13 kilobytes of RAM. This can be reduced if necessary by deleting the programs for any types of conversion not needed.


Variables Used

Convert uses the HOME variables q, Z and Y, and will therefore overwrite any existing information stored in them. It also changes the 'last answer' variable (Ans.)


Known Bugs

Since only one value can be stored in q at a time, it is not possible to use two or more physical constants or conversion factors in a single expression. Either copy the constants/factors to other variables or break the expression down into smaller sections.


Conversions Provided

This is a full list of all the unit conversion factors and physical constants used by Convert.

Units of Length
Conversion factors are to metres
Displayed asMultiplication factorNotes
millimetre0.001Millimetres
centimetre0.01Centimetres
metre1Metres
kilometre1000Kilometres
inch0.0254Inches
foot0.3048Feet
yard0.9144Yards, = 3 feet
pole [rod]5.0292Poles, rods and perches are all the same unit, = 5½ yards.
chain20.1168Chains, = 22 yards
furlong201.168Furlongs, = 10 chains
mile1609.344Miles, UK statute, = 1760 yards
league4828.032Leagues, = 3 miles
fathom1.8288Fathoms, = 6 feet
nautical mile1852Nautical miles.
There are three definitions of the nautical mile.
Originally it was the distance along the Earth's equator equivalent to a change in longitude of one minute of arc. This was taken to be 6080 feet.
Sometimes a 'rounded' nautical mile was used as exactly 1000 fathoms, which is 6000 feet.
The international nautical mile which is the one most commonly used nowadays, and is the one used by Convert, is defined as 1852 metres, which equates to 6076 feet.
astronom. unit1.4959787 x 1011Astronomical units, the mean distance between the Earth and the Sun.
(Actually the definition is slightly more complicated and involves a theoretical massless Earth.)
light year9.46053 x 1015Light years, the distance travelled by light through empty space in one tropical year of 365.24219 days.
parsec3.08568 x 1016Parsecs (parallax seconds), the distance at which one astronomical unit subtends an angle of one second of arc.
hand (horse)0.1016Hands, as used to measure the height of horses, = 4 inches.

Units of Area
Conversion factors are to square metres
Displayed asMultiplication factorNotes
mm²1 x 10-6Square millimetres
cm²0.0001Square centimetres
1Square metres
hectare10,000Hectares, = 10,000 square metres
km²1000,000Square kilometres
inch²6.4516 x 10-4Square inches
foot²0.092903Square feet
yard²0.836127Square yards
rood1011.71Roods, = 1210 square yards
acre4046.86Acres, = 4 roods
mile²2589988Square miles

Units of Volume
Conversion factors are to cubic metres
Displayed asMultiplication factorNotes
mm^31 x 10-9Cubic millimetres
cm^31 x 10-6Cubic centimetres
metre^31Cubic metres
km^31 x 109Cubic kilometres
inch^31.63871 x 10-5Cubic inches
foot^30.0283168Cubic feet
yard^30.764555Cubic yards
mile^34.16816 x 109Cubic miles
millilitre1 x 10-6Millilitres, same as cubic centimetres
litre0.001Litres, = 1000 cubic centimetres
dram3.55164 x 10-6Drams, = 1/8 of a UK fluid ounce
fluid oz (UK)2.84131 x 10-5British fluid ounces
gill1.42066 x 10-4Gills, = ¼ of a UK pint
pint (UK)5.68262 x 10-4British pints
gallon (UK)0.0045461British gallons, = 8 pints
teaspoon4.92892 x 10-6Teaspoonful, taken as approx 5 mls
tablespoon1.47868 x 10-5Tablespoonful, taken as approx 15 mls
fluid oz (US)2.95735 x 10-5American fluid ounce (slightly more than a British fluid ounce)
pint (US)4.73176 x 10-4American pint, = 16 American fluid ounces.
Thus smaller than a British pint.
gallon (US)0.00378541American gallon, = 8 American pints
barrel (oil)0.158987Barrel of oil, = 42 American gallons

Units of Mass/Weight
Conversion factors are to kilograms
Displayed asMultiplication factorNotes
milligram1 x 10-6Milligrams
gram0.001Grams
kilogram1Kilograms
tonne (metric)1000Metric tonnes, = 1000 kilograms
grain (avoir)5.90615 x 10-5Grains in the Avoirdupois system. Avoirdupois is the normal system of Imperial weight measurement, as used for buying food and cooking. There are 480 grains in an ounce.Note however that when 'grains' are referred to it is often Troy grains rather than Avoir grains which are intended. 480 Avoir grains = 437½ Troy grains.
dram (avoir)0.00177185Drams in the Avoirdupois system, = 1/16 ounce Avoir. Notice that a dram can also be a unit of volume.
ounce (avoir)0.0283495Ounces (Avoirdupois). The normal British ounce.
pound (avoir)0.45359237Pounds (Avoirdupois). The standard British pound weight.
stone6.35029Stone, = 14 pounds
hundredweight50.80231Hundredweight, often written cwt, = 112 pounds
ton (UK)1016.05British ton, = 2240 pounds
troy grain6.47989 x 10-5Grains in the Troy measurement system, as used for precious metals
troy pennywt0.00155517Troy pennyweights, = 24 Troy grains
troy ounce0.0311035Troy ounce, = 480 Troy grains
troy pound0.373242Troy pound, = 12 Troy ounces
carat2 x 10-4Carat, the unit of weight of precious stones.
The carat was originally 4 Avoirdupois grains (approx 207 milligrams), but early in the 20th century was redefined to be exactly 200 milligrams.
ton (US short)907.185American 'short' ton, = 2000 pounds
atom mass unit1.66054 x 10-27Atomic mass unit.
This is defined s 1/12 of the mass of an atom of 12Carbon and is the 'average' mass of protons and neutrons in a nucleus.

Units of Speed
Conversion factors are to metres per second
Displayed asMultiplication factorNotes
metre/sec1Metres per second
kilom/hour1/3.6Kilometres per hour
foot/sec0.3048Feet per second
mile/hour0.44704Miles per hour
knot0.514444Nautical miles per hour

Units of Force
Conversion factors are to Newtons
Displayed asMultiplication factorNotes
newton1Newtons
dyne1 x 10-5Dynes, the standard unit of force in the centimetre, gram, second system.
kg force9.80665Kilograms force, i.e. the force exerted by a mass of one kilogram on the Earth's surface
pound force4.44822Pounds force, the force exerted by a weight of one pound

Units of Pressure
Conversion factors are to Newtons per square metre (Pascals)
Displayed asMultiplication factorNotes
pascal [N/m²]1Pascals or newtons per square metre
megapascal1 x 106Megapascal, = 1 million pascals
kg/cm²98066.5Kilograms force per square centimetre
psi [lbs/in²]6894.76Pounds force per square inch
mmHg [torr]133.322Millimetres of mercury, also known as Torrs
millibar100Millibars, = 1/1000 of a bar
atmosphere101325The standard average atmospheric pressure at the Earth's surface

Units of Energy
Conversion factors are to Joules
Displayed asMultiplication factorNotes
joule1Joules, the work done when a force of one newton moves through a distance of one metre
electron volt1.60218 x 10-19Electron volts, the energy gained by an electron when it is moved through a potential of one volt
kilowatt hour3.6 x 106Kilowatt hours, a power of 1000 watts operating for one hour
erg1 x 10-7Ergs, one dyne moving a distance of one centimetre
calorie4.1868Calorie, the energy needed to raise the temperature of one gram of water by one degree Celsius.
The value of the calorie depends on the specific heat capacity of water, which varies with its temperature and to a small extent with the ambient pressure. Thus there are slightly different values of the calorie depending on the conditions.
The '15 degree' calorie refers to heating water from 14.5 to 15.5 °C and equals 4.1855 J.
The 'thermochemical' calorie uses the average specific heat capacity between 0 and 100°C and equals 4.184 J.
The 'international thermodynamic' calorie is the most commonly used and equals 4.1868 J.
kilocal [Cal]4186.8Kilocalories, often written as Calories with a capital C, = 1000 calories.
The energy content of food is usually quoted in kilocalories but if it is just written as Calories it can be confusing. 1 Calorie = 1000 calories.
foot pound1.35582Foot pounds, the work done when one pound force moves through a distance of one foot
BTU1055.06British Thermal Units, the energy needed to raise the temperature of one pound of water by 1 degree Fahrenheit
therm105,506,000Therms, = 100,000 British Thermal Units.
The energy content of domestic gas is sometimes quoted in therms.

Units of Power
Conversion factors are to Watts (Joules per second)
Displayed asMultiplication factorNotes
watt1Watts, = 1 joule per second
kilowatt1000Kilowatts, = 1000 watts
horsepower745.7Horsepower, originally defined as 550 foot pounds force per second
BTU/hour0.293071British Thermal Units per hour, sometimes used for domestic energy consumption
kcal/hour1.163Kilocalories per hour, used as a measure of the rate of using up the energy in food. Coincidentally it is just over one watt.

Units of Temperature
Conversions are to Kelvins
Displayed asMultiply by:Add:Notes
Kelvin10Kelvins, the absolute temperature scale such that absolute zero is 0 Kelvins.
°Celsius1273.15Celsius, formerly known as centigrade.
Freezing point of water = 0°C, boiling point of water = 100°C.
°Fahrenheit5/9255.37Fahrenheit
Freezing point of water = 32°F, boiling point of water = 212°F.
°Réaumur1.25273.15Réaumur, named after Antoine Réaumur (1683-1757).
Freezing point of water = 0°R, boiling point of water = 80°R.
°Rankine5/90Rankine, an absolute scale with units the same size as Fahrenheit
Gas Mark125/9394.26Gas mark, as used for the temperature setting of gas ovens.
This conversion method only works for gas marks between 1 and 9; gas mark ¼ and ½ do not fit the scale and ovens do not go above 9.

Physical Constants
The normal one or two letter abbreviation is shown.
All use SI units (kilograms, metres, seconds etc.)
Displayed asValueUnitsNotes
c light2.99792458 x 108m/sSpeed of light
G gravity6.6742 x 10-11Nm²/kg²Newton's gravitational constant.
g acc gravity9.80665m/s²Standard acceleration due to gravity at the Earth's surface
e elec charge1.6021773 x 10-19CoulombsCharge on the electron
h Planck6.6260755 x 10-34JsPlanck's constant
k Boltzmann1.380658 x 10-23J/KBoltzmann constant
s Stefan5.67051 x 10-8W/m²/K4Stefan's constant for black body radiation
N Avogadro6.0221367 x 1023/molAvogadro's constant, the number of atoms or molecules in one mole of a substance
R ideal gas8.31451J/K/molThe ideal gas constant, in the equation PV = nRT
V0 gas mol v0.0224141m³/molGas molar volume V0. The volume occupied by one mole of an ideal gas.
F Faraday96485.31C/molFaraday constant. The electric charge of one mole of electrons. Used e.g. in electrochemistry.
m0 permeabil4p x 10-7H/mPermeability of free space, m0. The ratio of magnetic flux density to external field strength.
e0 permittiv8.8541878 x 10-12F/mPermittivity of free space, e0. Used e.g. in calculating the force between two charges: F=(1/4pe0)Q1Q2/r².
a fine struc0.0072973531NoneFine structure constant. Defined as e²/(2he0c).
Note that a is a dimensionless constant and thus has the same value in any system of units. It happens to have a value close to 1/137 and physicists sometimes wonder about the significance of this number.
Me elec mass9.1093897 x 10-31kgRest mass of the electron
Mp prot mass1.6726231 x 10-27kgRest mass of the proton
Mn neut mass1.6749286 x 10-27>kgRest mass of the neutron
R¥ Rydberg1.0973732 x 107/mRydberg constant.
Used when calculating atomic spectra. Do not confuse with the gas constant R.
R¥ = m0²mee4c³/8h³


Program Listings

Note: the character ̃ represents the 'STO' arrow.
True line breaks in the program are shown by ¿, other line breaks are just to fit the listing into the table.


Program .Conv.SVExplanation
Defines the VIEWS menu. Only needs to be run once, when the aplet is first written, or if the views menu is changed.
SETVIEWS
"Length";".Conv.LEN";0;
"Area";".Conv.ARE";0;
"Volume";".Conv.VOL";0;
"Mass";".Conv.MAS";0;
"Speed";".Conv.SPE";0;
"Force";".Conv.FOR";0;
"Pressure";".Conv.PRE";0;
"Energy";".Conv.ENG";0;
"Power";".Conv.POW";0;
"Temperature";".Conv.TEM";0;
"Start";".Conv.S";8;
"Constants";".Conv.CON";0;
" ";".Conv.SV";10:¿
Define the menu items and specify which program is to be run when they are selected, and what view to return to afterwards. (Always the home view except for the Start option which displays the attached note.) Also lists program .Conv.SV with a menu name of a single space, so that it is linked to the aplet.

Program .Conv.LENExplanation
Performs conversions between units of length.
1̃Z:¿
FOR Y=1 TO 2;¿
{0.001,0.01,1,1000,
0.0254,0.3048,0.9144,
5.0292,20.1168,201.168,
1609.344,4828.032,
1.8288,1852,1.4959787E11,
9.46053E15,3.08568E16,
0.1016}̃Ans:¿
CHOOSE Z;"Length conversions";
"millimetre";"centimetre";
"metre";"kilometre";
"inch";"foot";
"yard";"pole [rod]";
"chain";"furlong";
"mile";"league";
"fathom";"nautical mile";
"astronom. unit";
"light year";
"parsec";"hand (horse)":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN Ans(Z)̃q:
ELSE q/Ans(Z)̃q:END:¿
END:¿
The basic principle is that a conversion factor for all the possible units to one standard unit is stored. For length conversions the standard unit is the metre.
When the 'from' unit is chosen the conversion factor to metres is stored in q.
When the 'to' unit is picked the previous value of q is divided by the new unit's conversion factor to metres.
The value in q is now the ratio of the two conversion factors to metres so that multiplying any value in the 'from' units by q will convert it to the 'to' units.

Program .Conv.AREExplanation
Performs conversions between units of area.
1̃Z:¿
FOR Y=1 TO 2;¿
{1E-6,1E-4,1,1E4,1E6,
6.4516E-4,0.092903,0.836127,
1011.71,4046.86,2589988}
̃Ans:¿
CHOOSE Z;"Area conversions";
"mm²";"cm²";
"m²";"hectare";
"km²";"inch²";
"foot²";"yard²";
"rood";"acre";
"mile²":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN Ans(Z)̃q:
ELSE q/Ans(Z)̃q:END:¿
END:¿
See explanation under .Conv.LEN.
The standard unit of area is the square metre.
Y controls a FOR loop to prompt for the units twice, the 'from' and 'to' units.
All the conversion factors to square metres are stored as a list in the Ans memory, to avoid corrupting any of the other lists.
The possible units are then presented in a 'choose' dialogue box, in the same order as in the Ans list.
The number of the chosen unit is obtained in Z and element number Z from the list is extracted and either stored in q (if Y==1) or divided into q (if Y==2).
The number in q is thus the overall conversion factor.

Program .Conv.VOLExplanation
Performs conversions between units of volume.
1̃Z:¿
FOR Y=1 TO 2;¿
{1E-9,1E-6,1,1E9,1.63871E-5,
0.0283168,0.764555,4.16816E9,
1E-6,0.001,3.55164E-6,2.84131E-5,
1.42066E-4,5.68262E-4,0.0045461,
4.92892E-6,1.47868E-5,
2.95735E-5,4.73176E-4,
0.00378541,0.158987}̃Ans:¿
CHOOSE Z;"Volume conversions";
"mm^3";"cm^3";"metre^3";"km^3";
"inch^3";"foot^3";
"yard^3";"mile^3";
"millilitre";"litre";
"dram";"fluid oz (UK)";
"gill";"pint (UK)";
"gallon (UK)";"teaspoon";
"tablespoon";
"fluid oz (US)";"pint (US)";
"gallon (US)";"barrel (oil)":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN Ans(Z)̃q:
ELSE q/Ans(Z)̃q:END:¿
END:¿
See explanations under .Conv.LEN and .Conv.ARE.
The standard unit of volume is the cubic metre.
Notice the need to use the raise to a power symbol ^ followed by a 3 to indicate cubing. The hp39g+ does not have a superscript 3 in its character set, even though one appears in the CHARS screen. ( 3 actually displays as -1.)

Program .Conv.MASExplanation
Performs conversions between units of mass/weight.
1̃Z:¿
FOR Y=1 TO 2;¿
{1E-6,1E-3,1,1000,5.90615E-5,
0.00177185,0.0283495,0.45359237,
6.35029,50.8023,1016.05,
6.47989E-5,0.00155517,0.0311035,
0.373242,2E-4,907.185,1.66054E-27}
̃Ans:¿
CHOOSE Z;"Mass conversions";
"milligram";"gram";
"kilogram";"tonne (metric)";
"grain (avoir)";"dram (avoir)";
"ounce (avoir)";"pound (avoir)";
"stone";"hundredweight";
"ton (UK)";
"troy grain";"troy pennywt";
"troy ounce";"troy pound";
"carat";"ton (US short)";
"atom mass unit":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN Ans(Z)̃q:
ELSE q/Ans(Z)̃q:END:¿
END:¿
See explanations under .Conv.LEN and .Conv.ARE.
The standard unit of mass is the kilogram.

Program .Conv.SPEExplanation
Performs conversions between units of speed.
1̃Z:¿
FOR Y=1 TO 2;¿
{1,1/3.6,0.3048,0.44704,0.514444}
̃Ans:¿
CHOOSE Z;"Speed conversions";
"metre/sec";"kilom/hour";
"foot/sec";"mile/hour";
"knot":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN Ans(Z)̃q:
ELSE q/Ans(Z)̃q:END:¿
END:¿
See explanations under .Conv.LEN and .Conv.ARE.
The standard unit of speed is the metre per second.

Program .Conv.FORExplanation
Performs conversions between units of force.
1̃Z:¿
FOR Y=1 TO 2;¿
{1,1E-5,9.80665,4.44822}
̃Ans:¿
CHOOSE Z;"Force conversions";
"newton";"dyne";"kg force";
"pound force":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN Ans(Z)̃q:
ELSE q/Ans(Z)̃q:END:¿
END:¿
See explanations under .Conv.LEN and .Conv.ARE.
The standard unit of force is the newton.

Program .Conv.PREExplanation
Performs conversions between units of pressure.
1̃Z:¿
FOR Y=1 TO 2;¿
{1,1E6,98066.5,6894.76,133.322,
100,101325}̃Ans:¿
CHOOSE Z;"Pressure conversions";
"pascal [N/m²]";"megapascal";
"kg/cm²";"psi [lbs/in²]";
"mmHg [torr]";"millibar";
"atmosphere":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN Ans(Z)̃q:
ELSE q/Ans(Z)̃q:END:¿
END:¿
See explanations under .Conv.LEN and .Conv.ARE.
The standard unit of pressure is the newton per square metre.

Program .Conv.ENGExplanation
Performs conversions between units of energy.
1̃Z:¿
FOR Y=1 TO 2;¿
{1,1.60218E-19,3.6E6,1E-7,
4.1868,4186.8,1.35582,1055.06,
105506000}̃Ans:¿
CHOOSE Z;"Energy conversions";
"joule";"electron volt";
"kilowatt hour";"erg";
"calorie";"kilocal [Cal]";
"foot pound";"BTU";
"therm":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN Ans(Z)̃q:
ELSE q/Ans(Z)̃q:END:¿
END:¿
See explanations under .Conv.LEN and .Conv.ARE.
The standard unit of energy is the joule.
Note that kilocalories, often written as Calories with a capital C, are what the energy content of food is usually quoted in. Do not confuse them with calories (with a small c).

Program .Conv.POWExplanation
Performs conversions between units of power.
1̃Z:¿
FOR Y=1 TO 2;¿
{1,1000,745.7,0.293071,1.163}
̃Ans:¿
CHOOSE Z;"Power conversions";
"watt";"kilowatt";
"horsepower";"BTU/hour";
"kcal/hour":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN Ans(Z)̃q:
ELSE q/Ans(Z)̃q:END:¿
END:¿
See explanations under .Conv.LEN and .Conv.ARE.
The standard unit of power is the watt (joules per second).
kcal is kilocalories.

Program .Conv.TEMExplanation
Performs conversions between units of temperature.
1̃Z:¿
FOR Y=1 TO 2;¿
{1,0,1,273.15,5/9,255.37,
1.25,273.15,5/9,0,
125/9,394.26}̃Ans:¿
CHOOSE Z;"Temperature conv.";
"Kelvin";"°Celsius";
"°Fahrenheit";"°Réaumur";
"°Rankine";"Gas mark":¿
IF Z==0 THEN STOP:END:¿
IF Y==1 THEN
Ans(Z*2-1)*q+Ans(Z*2)̃q:
ELSE (q-Ans(Z*2))/Ans(Z*2-1)
̃q:END:¿
END:¿
See explanations under .Conv.LEN and .Conv.ARE.
The standard unit of temperature is the Kelvin.
Temperature conversions are slightly different to the others because the different scales have different zero points. Hence to convert to Kelvins two numbers are needed: a multiplication factor and an addition.
In the list stored in Ans there are thus two numbers for each unit, stored consecutively and accessed via Z. As before the principle is first to convert to Kelvins then from Kelvins to the second unit.
The 'Gas Mark' conversions are only valid for gas mark numbers from 1 to 9, since the scale is not properly defined outside this range.

Program .Conv.SExplanation
This program is called when START is selected from the Aplet view.
  There is deliberately no text in this program!
It does nothing as such except that it allows pressing the START button to bring up the note attached to aplet Convert, since in the SetViews program (.Conv.SV), program .Conv.S is configured to go to the note view when it returns.

Program .Conv.CONExplanation
This program allows physical constants to be chosen.
1̃Z:¿
{2.99792458E8,6.6742E-11,
9.80665,1.6021773E-19,
6.6260755E-34,1.380658E-23,
5.67051E-8,6.0221367E23,
8.31451,0.0224141,96485.31,
4E-7*p,8.8541878E-12,
0.0072973531,9.1093897E-31,
1.6726231E-27,1.6749286E-27,
10973732}̃Ans:¿
CHOOSE Z;"Physical constants";
"c light";"G gravity";
"g acc grav";"e elec charge";
"h Planck";"k Boltzmann";
"s Stefan";"N Avogadro";
"R ideal gas";"V0 gas mol v";
"F Faraday";"m0 permeabil";
"e0 permittiv";"a fine struc";
"Me elec mass";"Mp prot mass";
"Mn neut mass";"R¥ Rydberg":¿
IF Z==0 THEN STOP:END:¿
Ans(Z)̃q:¿
This works on the same principle as the unit conversions, using the number of the menu choice to look up a value stored in the list in Ans, but there is no loop since the constant only needs to be chosen once.