9   Unit Conversions

The conversion tool changes the numerical value of a quantity from one unit to another. Enter a length in inches, for example, choose inches as the source and metres as the destination, and apply the conversion. The result is ready for the next calculation in either RPN or ALG.

SpicyRPN provides fifteen quantity families, from length and temperature to frequency and torque. Units are selected within a family; the tool does not infer a unit from a number or carry units through later arithmetic. You remain responsible for interpreting the result in the destination unit and combining compatible quantities.

9.1   Choose the quantity and conversion direction

Enter the number on the calculator before opening the conversion panel. There is no separate value field in Convert X. In RPN the input is X, labeled S0 in the full-stack view, including a number still being typed. Y is the next value at S1. In ALG the input is the current operand or completed result, as explained in section 9.2. Opening the panel does not finish a number or evaluate an expression.

With no pending command or active shift, press g 8, the blue CONV function. The panel is titled Convert X in both entry modes. It has three menu controls:

Table 9.1: The conversion panel’s controls.

Control

What to select

Dimension

The kind of quantity, such as Length, Volume, or Temperature.

From

The unit in which the current number is expressed.

To

The unit in which you want the result.

Apply

Perform the conversion and close the panel if it succeeds.

Close

Return to the calculator without converting the number.

Select Dimension first, then check both unit menus. Changing the dimension replaces both selections with that family’s first and second listed units. Changing to Length, for example, selects meter to kilometer. A new calculator state initially offers Length, meter to foot; later visits retain your selected choices. Always read From and To before applying, especially after changing the dimension.

Each menu entry includes a name and symbol, such as inch (in) or US gallon (US gal). The unit menus contain only units belonging to the chosen dimension. To reverse a conversion, select the old destination under From and the old source under To; there is no separate swap control.

Close leaves the current number, unfinished entry, or expression untouched. Changes to the menu choices are retained even if you close without applying. For example, closing midway through an RPN entry 12.3400 leaves those characters available for further typing; it does not turn the entry into a completed result.

If applying reports an error, the panel stays open and shows a message. Close it to correct the calculator input, then reopen it and apply the intended units. An unfinished ALG exponent, for example, must be completed before conversion can succeed. A nonfinite conversion result is rejected.

A starting state for the examples

Unless an example says otherwise, use real mode, 600 working digits, and FIX 4; RPN examples use a fixed stack of 5. Follow the setup procedures in section 2.2, section 5.2 and section 5.4. Start with no open tool, active shift, or pending command. Each independent sequence includes its clear, and no example requires empty memories.

9.2   What changes in RPN and ALG

RPN: replace X in place

A successful conversion finishes an active number entry and replaces X with the converted value. It does not lift or drop the stack. Y and all deeper positions stay where they are, in both fixed and unlimited stacks. If you were typing the input, the lift that began that entry has already occurred; applying the conversion does not add another one.

Both Last X and Last Y, the saved operands separate from the current S0/S1 values, are preserved. This differs from an ordinary single-operand mathematical function, which saves operands as described in section 2.9. Consequently, LAST X does not recover the input of a conversion merely because it was the most recent operation. Store or duplicate an input before conversion if you need to retain it.

Convert one operand while another waits

Use the chapter’s RPN starting state. Clear with f CLEAR, the orange function of \(1/x\), then enter:

2 ENTER 12 g 8

In Convert X, choose Dimension: Length, From: inch (in), and To: foot (ft), then press Apply. The main S0 (X) display is 1.0000; S1 (Y) still holds 2.0000. You can check it in the full-stack view. Close that view if open. Interpreting the waiting 2 as feet, press +. The sum is 3.0000 feet: \(2\,\mathrm {ft}+12\,\mathrm {in} =3\,\mathrm {ft}\).

After applying, a new digit starts a new RPN number and lifts the converted result in the usual way. An idle ENTER duplicates the converted result. You do not need an extra ENTER merely to finish the conversion.

ALG: replace the current operand

In an unfinished ALG expression, conversion replaces the current trailing operand and preserves the surrounding expression. It does not evaluate the whole expression. A closed parenthesized group or function call counts as one operand: the converted value replaces that group or call. Supply the operand you intend to convert before opening the panel; an expression ending in an operator is not a request to convert its eventual total.

Convert centimetres inside an ALG expression

Use the chapter’s ALG starting state. Press the unshifted CLEAR, then enter:

2 + 100 g 8

Choose Dimension: Length, From: centimeter (cm), and To: meter (m), then press Apply. The current operand becomes 1.0000; the expression now contains \(2+1\). Continue with:

\(\times \) 3 =

The result is 5.0000. Interpreting the initial 2 as metres and 3 as a dimensionless multiplier, the calculation is \(2\,\mathrm {m}+(100\,\mathrm {cm})\times 3=5\,\mathrm {m}\). The conversion affected the 100, not the sum of 2 and 100.

To convert an entire ALG calculation, finish it with = first. Applying the conversion then starts a new expression containing only the converted value. The previous ANS remains unchanged until you press = again. You may instead continue with an operator and further operands, then evaluate that new expression. See section 4.8 for answer and continuation rules.

Conversions do not alter memory banks or the other entry mode’s suspended workspace. A recalled value is converted in the working area; its source memory remains unchanged unless you store the new value there yourself. No unit tag is attached to the resulting number, so remember its meaning when storing or reusing it.

9.3   Length, area, volume, and mass

Choose the dimension of the value you actually have. A floor area measured in square feet belongs to Area, not Length. A container’s capacity in cubic feet belongs to Volume. The area and volume conversions already include the squared or cubed length factors: you should not square or cube the numerical input again.

For example, one foot is 0.3048 metre, one square foot is 0.09290304 square metre, and one cubic foot is 28.316846592 litres. The three factors are different because the quantities are different. A litre is \(1000\,\mathrm {cm}^3\), while a millilitre and a cubic centimetre represent the same volume.

Table 9.2: Representative size and mass choices. The full selectable inventory is in section 15.10.

Dimension

Examples and distinctions

Length

meter (m), inch (in), foot (ft), mile (mi), nautical mile (nmi). Use a length unit for a distance, not an area or capacity.

Area

square meter (\(\mathrm {m}^2\)), square foot (\(\mathrm {ft}^2\)), acre (acre), hectare (ha). The factor already includes the square.

Volume

liter (L), cubic centimeter (\(\mathrm {cm}^3\)), US gallon (US gal), Imperial gallon (Imp gal). Read liquid-unit prefixes carefully.

Mass

kilogram (kg), ounce (oz), pound (lb), metric tonne (t), US short ton (short ton), Imperial long ton (long ton). Mass ounces are distinct from fluid ounces.

The inch, foot, yard, and mile use the international length definitions: one inch is 0.0254 metre, one foot is 0.3048 metre, and one mile is 1609.344 metres. The nautical mile is 1852 metres. No separate survey-foot or historical-mile choice is provided. For land area, an acre is 4046.8564224 square metres and a hectare is 10 000 square metres.

Mass uses the ordinary avoirdupois ounce and pound: 16 ounces make one pound, and one pound is 0.45359237 kilogram. A stone is 14 pounds. The ounce in Mass is not a fluid ounce, and there is no troy-ounce choice. A mass cannot be converted directly to a volume without additional information such as density.

Check an area, a capacity, and a mass

For each independent row below, use the chapter’s RPN starting state. Press f CLEAR, type the input, then press g 8. Choose the stated dimension and the named From and To units, then press Apply.

Input

Dimension; From \(\longrightarrow \) To

Display
1

Area; acre \(\longrightarrow \) square meter

4,046.8564
2.5

Volume; liter \(\longrightarrow \) cubic centimeter

2,500.0000
180

Mass; pound \(\longrightarrow \) kilogram

81.6466

The results are in square metres, cubic centimetres, and kilograms, respectively. The unrounded mass result is 81.6466266 kilograms. The display rounds it; the retained value is used by later arithmetic.

9.4   US and Imperial names are part of the unit

US and Imperial liquid measures share familiar names but have different sizes. Select the full name, including its prefix. The US entries in Volume are the liquid measures; they are not US dry pints, quarts, or gallons. Table 9.3 gives the definitions used by the tool.

Table 9.3: Litres in one US or Imperial liquid unit. These are the defining decimal factors, before working-precision rounding.
Unit US Imperial
Fluid ounce 0.0295735295625 0.0284130625
Pint 0.473176473 0.56826125
Quart 0.946352946 1.1365225
Gallon 3.785411784 4.54609

Both systems have two pints to a quart and four quarts to a gallon, but a US pint contains 16 US fluid ounces while an Imperial pint contains 20 Imperial fluid ounces. An Imperial gallon is larger than a US gallon, although an Imperial fluid ounce is smaller than a US fluid ounce. Applying one blanket US-to-Imperial multiplier to every similarly named unit would therefore be wrong.

The mass menu also distinguishes three large units. A metric tonne is 1000 kilograms. A US short ton is 2000 pounds, or 907.18474 kilograms; an Imperial long ton is 2240 pounds, or 1016.0469088 kilograms. A quantity labeled only “tons” needs its convention identified before conversion. None of these choices changes the definition of the pound.

Compare the two gallons

Use the chapter’s RPN starting state. Press f CLEAR 1 g 8. Select Dimension: Volume, From: US gallon (US gal), and To: liter (L), then press Apply. The display is 3.7854 litres.

Repeat the complete clear-and-entry sequence with a fresh 1. This time select From: Imperial gallon (Imp gal) and keep To: liter (L). After Apply, the display is 4.5461 litres. Re-entering 1 matters: simply reopening the tool after the first result would convert the current 3.785411784, not the original one gallon.

9.5   Temperature readings and temperature differences

Temperature offers kelvin (K), degree Celsius (\({}^{\circ }\mathrm {C}\)), degree Fahrenheit (\({}^{\circ }\mathrm {F}\)), and degree Rankine (\({}^{\circ }\mathrm {R}\)). These choices convert temperature readings, including their different zero points. If \(C\), \(F\), \(K\), and \(R\) are the numerical readings in those units, the defining relationships are

\begin{align*} K &= C+273.15, & K &= (F+459.67)\frac {5}{9}, \\ K &= R\frac {5}{9}, & F &= \frac {9}{5}C+32. \end{align*}

The tool applies the appropriate scale and offset automatically. You do not enter 273.15 or 32 as a second operand.

Convert a Fahrenheit reading

Use the chapter’s RPN starting state. Press:

f CLEAR 68 g 8

Choose Dimension: Temperature, From: degree Fahrenheit, and To: degree Celsius, then press Apply. The display is 20.0000. The check is \((68-32)\times 5/9=20\): 68 degrees Fahrenheit is 20 degrees Celsius.

A temperature difference has no zero-point offset. A rise of 10 Celsius degrees is a rise of 18 Fahrenheit degrees; converting the reading 10 degrees Celsius with the tool instead gives a reading of 50 degrees Fahrenheit. There is no separate temperature-difference menu. For an interval, multiply by \(9/5\) from Celsius or kelvin increments to Fahrenheit or Rankine increments, or by \(5/9\) in the reverse direction. Celsius and kelvin increments have equal size, as do Fahrenheit and Rankine increments.

For instance, in the preceding RPN settings with no pending prefix, f CLEAR 10 ENTER 9 \(\times \) 5 \(\div \) displays 18.0000, the Fahrenheit interval corresponding to a 10-degree Celsius change. This arithmetic deliberately omits the offset.

The tool applies its formulas to negative inputs too. It does not reject a reading below absolute zero or certify that a temperature is physically attainable. Around a mathematical zero, finite-precision offset arithmetic can leave a very small nonzero residue; see section 9.9.

9.6   Motion, force, pressure, and torque

The mechanical families use scale factors without temperature-style offsets. Choose the complete compound unit from its own dimension: speed already includes time in the denominator, acceleration includes time squared, and pressure includes area. There is no need to convert each constituent unit separately.

Table 9.4: Representative mechanical choices and the quantities they express.

Dimension

Examples and distinctions

Speed

meter per second (m/s), mile per hour (mph), knot (kn). These express distance per unit time.

Acceleration

meter per second squared (\(\mathrm {m/s}^2\)), standard gravity (\(g_0\)). Do not confuse \(g_0\) with gram (g).

Force

newton (N), pound-force (lbf). A pound-force is not a mass.

Pressure

pascal (Pa), kilopascal (kPa), pound per square inch (psi), torr (Torr). Conversion preserves the input’s pressure reference.

Torque

newton-meter (\(\mathrm {N}\mathbin {\cdot }\mathrm {m}\)), pound-foot (\(\mathrm {lbf}\mathbin {\cdot }\mathrm {ft}\)). Choose Torque even though energy can have the same dimensions.

A knot is one nautical mile per hour, or 1.852 kilometres per hour. One mile per hour is 0.44704 metre per second. Standard gravity is the fixed reference \(g_0=9.80665\,\mathrm {m/s}^2\); it does not estimate the local acceleration of gravity. Its symbol \(g_0\) also differs from g, the gram in the Mass menu.

Keep pound mass and pound-force distinct. The Mass menu’s pound converts to kilograms; the Force menu’s pound-force converts to newtons, using \(1\,\mathrm {lbf}=4.4482216152605\,\mathrm {N}\). The tool does not turn a mass into a force by selecting a local gravity. To calculate weight from mass, first express the mass and acceleration in compatible units, then multiply them.

Pressure conversion changes the unit, not its reference zero. A gauge-pressure input remains a gauge-pressure number in the destination unit; the tool does not add atmospheric pressure to make it absolute. One standard atmosphere is 101 325 pascals, one bar is 100 000 pascals, and 760 torr is one standard atmosphere under the catalog’s definition.

Torque’s pound-foot means pound-force times foot. The factor is \(1\,\mathrm {lbf}\mathbin {\cdot }\mathrm {ft} =1.3558179483314004\,\mathrm {N}\mathbin {\cdot }\mathrm {m}\). Torque and energy remain separate dimensions in the menus even though both can involve a force times a distance. A torque conversion is not a calculation of work through an angle.

Convert a pressure to kilopascals

Use the chapter’s RPN starting state. Press f CLEAR 35 g 8. Select Dimension: Pressure, From: pound per square inch (psi), and To: kilopascal (kPa), then press Apply. The display is 241.3165 kilopascals. If the original 35 psi was gauge pressure, this result is also gauge pressure.

9.7   Energy, power, time, and frequency

Energy and power answer different questions. Power is a rate of energy transfer; multiplying a constant power by its duration gives an energy. The conversion tool can convert watts to horsepower or kilowatt-hours to joules, but cannot convert watts directly to joules without a duration.

Table 9.5: Representative energy, power, time, and frequency choices.

Dimension

Examples and distinctions

Energy

joule (J), kilowatt-hour (kWh), thermochemical calorie (cal), International Table BTU (BTU). Identify the named calorie or BTU convention.

Power

watt (W), kilowatt (kW), mechanical horsepower (hp). A duration is needed to obtain energy.

Time

second (s), hour (h), day (d). Use decimal quantities; a day is a fixed duration of 24 hours.

Frequency

hertz (Hz), kilohertz (kHz), gigahertz (GHz). Frequency and period are reciprocals, not units in one family.

One watt-hour is 3600 joules and one kilowatt-hour is 3.6 megajoules. The calorie choices use the thermochemical definition: \(1\,\mathrm {cal}=4.184\,\mathrm {J}\) and \(1\,\mathrm {kcal}=4184\,\mathrm {J}\). A nutrition label’s “Calorie” convention ordinarily means a kilocalorie, so identify the source convention before choosing cal or kcal. The BTU choice is specifically the International Table unit, using 1055.05585262 joules per BTU. The power choice is mechanical horsepower, using 745.69987158227022 watts per hp; other horsepower conventions are not separate choices.

Convert energy calculated from power and time

Use the chapter’s RPN starting state. A constant 1.5-kilowatt load runs for 3 hours. Form the kilowatt-hours first:

f CLEAR 1.5 ENTER 3 \(\times \)

The display is 4.5000, representing 4.5 kWh. Press g 8; choose Dimension: Energy, From: kilowatt-hour (kWh), and To: megajoule (MJ), then press Apply. The display is 16.2000, since \(4.5\times 3.6=16.2\) megajoules.

Time uses fixed durations: 60 seconds per minute, 3600 seconds per hour, and 86 400 seconds per day. A day here is exactly 24 hours; the tool does not account for calendar dates, time zones, or changes in civil-clock time. Use the date operations in chapter 13 for calendar-date calculations.

Time inputs are decimal quantities, not hours-and-minutes fields. For example, 1.5 hours means one hour and thirty minutes; 1.30 hours means one hour and eighteen minutes. Convert mixed units to a common unit before adding them.

Frequency units differ by powers of 1000: \(1\,\mathrm {GHz}=1000\,\mathrm {MHz}\), for example. A period in seconds and a frequency in hertz are reciprocal quantities, not two units within one conversion family. Use \(1/x\) to take a reciprocal when that relationship is appropriate, then convert the resulting frequency or duration within its own family.

9.8   Angle conversion and the angle setting

The Angle dimension offers radian (rad), degree (\({}^{\circ }\)), gradian (grad), and turn (turn). Their defining full-circle relation is

\[ 1\,\mathrm {turn}=360^{\circ }=400\,\mathrm {grad}=2\pi \,\mathrm {rad}. \]

Enter decimal degrees, not a packed degrees-minutes-seconds value. An angle of \(30^{\circ }30'\), for example, is 30.5 decimal degrees. The tool scales the number without reducing it to one revolution: multiple turns and negative angles retain their meaning.

The From and To selections determine the conversion regardless of the display’s DEG, RAD, or GRAD setting. Applying a conversion does not change that setting. Conversely, changing the angle setting does not convert a scalar number already in the working area. For a committed complex pair in polar display, it re-expresses the same phase in the new unit. During unfinished polar entry, however, it changes how the unchanged angle digits will be interpreted. Finish the pair before changing units to preserve its direction; see section 8.3.

Convert degrees, then use the radian result

Use the chapter’s RPN starting state with DEG. On the Scientific panel, select degrees if needed with f SIN, its orange DEG function. Press:

f CLEAR 90 g 8

Choose Dimension: Angle, From: degree, and To: radian, then press Apply. The display is 1.5708, representing \(\pi /2\) radians. The flag still says DEG.

Press f COS, the orange RAD function, then SIN. The display is 1.0000. Selecting RAD made sine interpret the converted operand as radians; it did not change that operand. The undisplayed digits of \(\pi /2\) were retained for the sine calculation.

In ALG, choose the angle setting before entering a trigonometric function. A function already inserted in an expression retains the angle unit selected at its insertion, as described in section 4.5. Converting an operand does not rewrite that function’s angle convention.

9.9   Conversion factors, precision, and rounding

Except for temperature offsets and the angle path through radians, conversion is a change of scale. If \(s_{\mathrm {from}}\) and \(s_{\mathrm {to}}\) express one source and destination unit in a common base unit, the numerical result is

\[ v_{\mathrm {to}}=v_{\mathrm {from}} \frac {s_{\mathrm {from}}}{s_{\mathrm {to}}}. \]

Temperature first accounts for the source zero point and finally removes the destination offset. The separate treatment explains why zero normally stays zero for a scale conversion, but zero Celsius becomes 273.15 kelvin.

Conversion factors are stored as decimal definitions or ratios of integers and evaluated at the current working precision. For example, the inch factor is \(254/10000\) metre; the torr factor is \(101325/760\) pascal. Angles use \(\pi \) computed at the active precision. The tool does not pass values through ordinary machine-precision decimal factors before doing the calculation.

An exact unit definition does not make every floating-point result exact. Decimal factors such as 0.0254, repeating quotients, and irrational multiples of \(\pi \) generally need finite binary approximations. Each real arithmetic step rounds to nearest, with ties to even, at the selected working precision. A sequence of such steps can accumulate rounding; the whole conversion is not a promise of one perfectly rounded exact formula.

What the displayed digits mean

Conversions retain undisplayed digits under the formatting rules in section 5.6. Even choosing the same unit in both menus creates a result at the current working precision; it does not recover information lost from an older input. See section 5.7 when changing precision.

A conversion out and back likewise need not restore the original binary value bit for bit. Prefer converting directly from the original quantity to the required unit, and retain the original when comparing several destinations. A useful check is to convert a familiar reference quantity, such as 12 inches to 1 foot or 1 kilowatt-hour to 3.6 megajoules, using the same selected units and direction.

The tables in this chapter highlight choices that are easy to confuse. For every selectable unit, use section 15.10; for the complete factor and offset catalog, use section C.13.