Loki for the Web

This group of pages has my contributions to the Internet community.

Entry Unit
no unit
Distance
Angstrom unit
micron
mil
caliber
point, printers
pica, printers
inch
hand
link, surveyor
feet
' " (feet and inches)
link, engineer
cubit
stud
yard
megalithic yard
meter
ell
Smoot
fathom
rod
chain, surveyor
chain, engineer
furlong
cable
km
mile
nautical miles
league
astronomical unit
light-year
parsec
Area
barn
circular mil
in^2
tile, 1x1
tile, 2x2
tile, 4x4
face brick
paver brick
tile, 6x6
tile, 8x8
block
ft^2
tile, 12x12
tile, 18x18
yd^2
m^2
sheet, 4x8
roof bundle
wallpaper roll
paint gal
are
acre
hectare
km^2
mi^2
section
township
Volume
micron^3
ml (milliliter)
dram
tsp (teaspoon)
tbsp (tablespoon)
in^3
floz (fluid ounce)
gill, US
gill, UK
cup
pint, US liquid
pint, US dry
quart, US liquid
l (litre)
quart, US dry
board-ft
gal, US liquid
gal, US dry
gal, UK liquid
peck
ft^3
bushel
barrel, US dry
barrel, US liquid
barrel, oil
hogshead
gravel ton
cord-ft
yd^3
m^3
stere
cord
acre-ft
km^3
mi^3
Mass
carat
gram
scruple
gram, av
dram
gram, troy
grain
oz, av
oz, troy
lb, troy
lb, av
kg (kilogram)
stone
slug
hweight, 100
hweight, 112
ton
mton (metric ton)
Angle
grad
deg (degrees of arc)
deg:min:sec
ra (Right Ascention)
rad (radians)
Time
sec (seconds)
: : (HH:MM:SS)
min
hr
day
week
fortnight
lunation
yr
century
Date
y (date)
Temperature
oC (deg Celsius)
oF (deg Farenheight)
K (Kelvins)
oR (deg Rankin)
Speed
kph (km per hour)
fps (feet per second)
mph (miles per hour)
knots
mps (meters per sec)
fpf (furlongs/fortnight)
Data
GBy (GigaBytes)
MBy (MegaBytes)
KBy (kiloBytes)
By (bytes)
ny (nybbles)
bit (bits)
Data Rate
Byps (Bytes/second)
bps (bits/second)
Loki
L
 
T
Z
Y
X
 
Entry
Fractions Mode
off
fixed denom..
factors of denom.
most precise
denominator
radix .
radix ,
Show
no unit
Distance
Angstrom unit, 1e-10m
micron, 1e-6m
mil, 1/1000 in
caliber, 1/100 in
point, printers
pica, printers
inch
hand, 4in
link, surveyor, 7.92in
ft (feet)
' " (feet and inches)
link, engineer, 12in
cubit
stud, 16in
megalithic yard
yard
m (meters)
ell
Smoot
fathom, 6ft
rod
chain, surveyor
chain, engineer
furlong
cable
km
mi (miles)
nmi (nautical miles)
league (int'l nautical, 3nmi)
astronomical unit, IAU
light-year
parsec, IAU
Area
barn, 1e-28m^2
circular mil
in^2
tile, 1x1
tile, 2x2
tile, 4x4
face brick, 21in^2
paver brick, 32in^2
tile, 6x6
tile, 8x8
block, 128in^2
ft^2
tile, 12x12
tile, 18x18
yd^2
m^2
sheet, 4x8
roof bundle, 33.33ft^2
wallpaper roll, 56ft^2
paint gal, 350ft^2
are
acre
hectare, 1e4m^2
km^2
mi^2
section
townshp
Volume
micron^3
ml (milliliter)
dram, fluid US
tsp (teaspoon)
tbsp (tablespoon)
in^3
floz (fluid ounce)
gill, US
gill, UK
cup
pint, US liquid
pint, US dry
quart, US liquid
l (litre)
quart, US dry
board-ft, 144 in^3
gallon, US liquid
gallon, US dry
gallon, Uk liquid
peck
ft^3
bushel
barrel, US dry, 105dry qt
barrel, US liquid, 31.5gal
barrel, oil, 42gal
hogshead
gravel ton, .77yd^3
cord-ft, 16ft^3
yd^3
m^3
stere
cord
acre-ft
km^3
mi^3
Mass
carat
gram
scruple
gram, avoirdupois
dram
gram, troy
grain
ounce mass avoirdupois
ounce mass troy
lb (pound mass troy)
lb (pound mass avoirdupois)
kg (kilogram)
stone
slug
hundredweight, 100lbs
hundredweight, 112lbs
ton
mton (metric tons)
Angle
grad
deg (degrees of arc)
deg:min:sec
ra (Right Ascention)
rad (radians)
Time
sec (seconds)
: : (HH:MM:SS)
minute
hour
day
week
fortnight
lunation, 42,532min
year
century
Date
y (date)
Temperature
oC (deg Celsius)
oF (deg Farenheight)
K (Kelvin)
oR (deg Rankin)
Speed
kph (km per hour)
fps (feet per second)
mph (miles per hour)
knots
mps (meters per sec)
fpf (furlongs/fortnight)
Data
GBy (GigaBytes)
MBy (MegaBytes)
KBy (kiloBytes)
By (bytes)
ny (nybbles)
bit (bits)
Data Rate
Byps (Bytes/second)
bps (bits/second)

Notes

Loki operates as a standard RPN calculator. However, it's extended capabilities take a little explaining. These capabilities fall into the areas of input, operators, and display.

Loki's unit operations are designed to make life easy in situations which you come across in the real world. For example, you can square a distance unit to get an area. However, if you enter nonsense, you'll get nonsense back: adding a mass to an angle gives a result, but probably not a useful one.

Input

Numbers With Units

Essentially, you enter numbers as you would expect to. For example, if the input units were deg:min:sec, you could enter the value 45 degress 30 minutes 14 seconds a value as:

4 5 u 3 0 u 1 4

Note that the u key represents any units separator. If a value has only one separator (e.g., feet and inches), you use u once. If a value has two separators (e.g., h:m:s), you use u twice. If the unit has no separators (e.g., inches), you don't use the u key.

Each of the numbers (45, 30, and 14) is itself entered as an arbitrary fraction. The three values are scaled internally before being converted to standard form. In this example, the program does:

45 + 30/60 + 14/3600

...and the whole value converted to radians (the standard angle form).

Fractions

Any value can be entered as a fraction. Fractional values are entered as:

integer ab/c numerator ab/c denominator

Again, each of the integer, numerator, and denominator values can be an arbitrary number. The program performs the obvious calculation (integer + numerator/denominator) to determine the value.

If any of the components are missing, the program supplies defaults according to the following table.

enter......and get
  ab/c    ab/c  zero
  ab/c    ab/c Dzero (0 + 0 / D)
  ab/c N ab/c  N / default denominator
  ab/c N ab/c DN / D
I ab/c    ab/c  I
I ab/c    ab/c DI / D
I ab/c N ab/c  I + N / default denominator
I ab/c N ab/c DI + N / D

Arbitrary Numbers

Numbers are what you would expect:

  • an optional +/-,
  • zero or more digits,
  • an optional radix mark,
  • zero or more digits,
  • an optional EEX,
  • if the EEX is present, an optional +/-, and
  • zero or more digits.

These combinations permit some weird results: you can have up to three of each form of fraction mark in a number, and up to 9 radix and/or EEX marks!

Operators

All of the operators work in the obvious manner: + performs * addition, performs multiplication, etc. However, some have special properties when used with certain unit groups. These special combinations are listed in the following table.

The diagonal operator (the triangle with the black hypotenuse) computes the length of the diagonal, given the two sides in X and Y.

operator input unit(s) notes
square rootareaResults in a distance.
squaredistanceResults in an area.
cube rootvolumeResults in a distance.
cubedistanceResults in a volume.
additiondate, anyComputes the new date from the base date plus (or minus) the specified number of days, using the actual calendar. The result is a date.
 temperature, anyAdds any as a delta temperature to the first value. Thus, 5oC plus 9oF gives 10oC, not around 280oC.
subtractiondate, dateComputes the number of days between the dates, using the actual calendar. The result has no unit.
 date, any but dateComputes the new date from the base date minus (or plus) the specified number of days, using the actual calendar. The result is a date.
 temperature, anySubtracts any as a delta temperature from the first value.
multiplicationdistance, distanceResults in an area.
 distance, area or
area, distance
Results in a volume.
 speed, time or
time, speed
Results in a distance.
 data rate, time or
time, data rate
Results in a data amount.
divisionvolume, distanceResults in an area.
 volume, areaResults in a distance.
 area, distanceResults in a distance.
 distance, timeResults in a speed.
 data amount, timeResults in a data rate.
percent, delta percent, diagonal, and inverseanyignore units

Display

Values are stored internally in a standard form along with their type group information. For example, all distance values are stored in meters and all mass values are stored in kg. (Well, except for temperatures, which are special-cased: see the preceeding section.)

When a value is displayed, the program iterates over all units in that group. It converts to and displays each checked unit. If no units are checked, it is displayed without a unit. Careful observation will show that the display unit(s) are completely separate from the input unit.

When a value is displayed, it can be displayed in one of four ways. For these examples, a value of 1.76 and a denominator of 8 will be used.

  • As a decimal value: you see 1.76.
  • As a fraction in fixed denominator mode. The specified denominator will be used. You will see 1 6/8^. The "^" character means that the true value is higher than shown. (A "v" character is sued when the true value is lower.)
  • As a fraction in factors of denominator mode. The specified denominator will be used, but the fraction will be reduced to its simplest form. You will see 1 3/4^.
  • As a fraction in most precise mode. The most precise mode tries all denominators to find the closest match. In this example, the value 1 3/4^ would be seen. If the denominator was 100, the value 1 38/50 would be seen.

Notes

The megalithic yard (0.83m) was devised by Alexander Thom (1894-1985). More information can be found at http://www.britannia.com/wonder/thom.html.

Creative Contributions

Others' Contributions

Apple-related

Internet FAQs

Code

“How-Tos”

Data

Neat


 
 

I am Craig A. Finseth.

Back to Home.

Back to top.

Last modified Sunday, 2013-04-07T16:48:39-05:00.