CONVERT

Calculator Key: ■Convert

Member Of Menu: 
None
Argument Types: 
Real
String
Symbol
Result Type(s): 
Real
String
Symbol
Invertible: 
No
Valid In Expression: 
No
Stack Diagram: 
Real1 Symbol2 Symbol3 Real4 Symbol3
Real1 Symbol2 String3 Real4 String3
Real1 String2 Symbol3 Real4 Symbol3
Real1 String2 String3 Real4 String3

This operation performs a unit conversion of the value in Real1 from the unit described by Symbol2 or String2 to the unit described by Symbol3 or String3. Refer to Built-In Units for information about the different units supported by default by Halcyon Calc. If you specify the unit as a string, you can use combinations of units to create more complex units like "ft / s ^ 2". The rules for these units are:

  1. You can use a divide operator zero or one times in the unit expression.
  2. You can use the multiply operator as many times as you would like in the unit expression. If the unit expression has a divide operator, you can use the multiple operator as many times as you would like in the numerator and the denominator of the unit expression.
  3. Any individual unit in the unit expression can be exponentiated by an integer value which is 1 or greater.
  4. You can use the constant 1 as the numerator in a unit expression as long as it is immediately followed by the divide operator. This lets you create units like "1 / s".

Before performing any requested conversion, the units are checked for compatibility. All units, including the built-in units, are a combination of eight base quantities:

Base Quantity Base Units
Length meter (m)
Mass kilogram (kg)
Time second (s)
Electric Current ampere (A)
Thermodynamic Temperature Kelvin (°K)
Luminous Intensity candela (cd)
Amount of Substance mole (mol)
User Defined ?

The user defined quantity can be used to represent any base quantity you would like which is not easily expressible in terms of the other seven. This is particularly useful with user defined units. You can define your own unit by creating a symbol with the name of your unit. The value of the symbol must be a list with two items. The first item must be a real value which is the conversion factor. The second item must be a string or symbol which represents the units for that conversion factor. For example, to create a unit for a decade, you can store the list { 10 "yr" } into the symbol 'dec'. The list says that a decade is 10 years. Once you have stored this value, you can then do conversions from hours to decades or even feet per second to astronomical units per decade.

Conversions of temperatures are a bit more complicated because the zero point varies. If converting from Celsius to Fahrenheit, the conversion will take into account the fact that these two scales have a different zero value on their respective scales. But, if you convert degrees Celsius per second to degrees Fahrenheit per second, the different zero value is ignored and only the different value of a single degree is considered.

Also, there are units built in like arc seconds and degrees which measure angles. These units are inherently dimensionless. That means you can convert meters per degree to feet if you like. Because degree is dimensionless, the calculator considers these units to be compatible but this would be a pretty meaningless conversion. Be careful when using angles because the calculator cannot easily validate that your conversion makes sense.

With built-in units, you can prefix any of these SI prefixes:

Prefix Name Factor
E exa 1018
P peta 1015
T tera 1012
G giga 109
M mega 106
k or K kilo 103
h or H hecto 102
D deka 101
d deci 10-1
c deci 10-2
m deci 10-3
μ micro 10-6
n nano 10-9
p pico 10-12
f femto 10-15
a atto 10-18

Note that if putting this prefix on a built-in unit causes it to then match a different built-in unit, then the calculator matches the built-in unit without the prefix. Also, you can create units like "Mft" for mega-feet and the calculator will treat this as millions of feet even though the prefix doesn't make much sense on non-SI units. Finally, the calculator will not automatically apply these prefixes to your own custom units. You can always define more custom units with the prefix so if you want to convert to "kilo-decades", you can create custom unit called 'kdec'.