This form is quite much identical to BisqBot's
.cl command, and also close match to
Google's calculator.
<Disabled for now>
Written by
Bisqwit.
Features that come from GNU units:
Unit calculations:
Example: ".cl 5 km + 2 feet"
Unit conversions:
Example: ".cl 16 m/s in km/h"
SI units:
kg, s, m, A, cd, mol, K
Prefixes:
atto,femto,pico,nano,milli,kilo,mega,giga, etc
Derivative units:
newtons, watts, joules, tesla, volts, pascals, etc
Heretic units:
inches, miles, furlongs, stadions, feet, teaspoons, etc
From USA, Britain, Greek, etc
Currencies:
With three-letter currency codes. Rates are 4-hour recent.
Constants:
Speed of light, electron mass, earth gravity, ...
Functions:
spherevolume(), circlearea(), etc
Math:
basic +, -, *, / operators
More can be found at GNU units documentation / source.
Some alternative spellings have been added,
such as mpg "miles per gallon" or rpm "revolutions per minute".
"h" is short for "hour", not for planck's const.
This enables "km/h" to work.
"once in blue moon" is recognized.
Radix conversions:
Input:
<base> <number>, 0b<binary>, 0o<octal>, 0x<hex>
Output:
in <base>
Floating point values as well
"base-12 1.4e7" = (1 + 4/12) * 12 ^ 7
"0x1.5p+7" = (1 + 5/16) * 2^7
Example:
.cl hex 5A10 in decimal
Bases: binary, octal, hexadecimal, decimal, base-<number>
Also roman numbers: use "roman" as the base.
Temperature conversions:
fahrenheit to celsius and vice versa: .cl 5°C in °F
Alternative syntax:
Spelling abbreviations out:
mass of electron, proton, jupiter, uranus, etc
radius of mercury, venus, etc
heretic units as "US <unit>" and "Imperial <unit>"
m=meters, C=coulombs, F=farads, etc
Verbal functions:
"square inch" automatically converts to "inch^2"
"5 squared" automatically converts to "5^2"
"and" is +, "times" is *, "divided by" is /
"square root of __", "the __th root of __"
Plurals:
All units and constants are recognized in English singular and plural
In output, singular is used, except when preceded by a non-one number
Guessing the appropriate (SI) unit(s) of result
".cl 5V * 4A" outputs "20 watts", not "20 kg m^2 / s^3"
Note: SI units favored. ".cl 5 inch + 5 feet" gives the result in
meters, not in average 8-year old indian circus elephant heights
or something equally funny.
Guessing the missing units
Example:
".cl 5 m^2 in Pa" gives a hint "Missing unit or constant: newtons"
Sometimes, filling in an appropriate function automatically.
Example:
".cl 5 mg in GJ" gives "449.4 GJ (using formula: E = m*c^2)"
Works even with reciprocal conversions
Operators:
Factorials
Choose operator
NesVideoAgent/Calc last edited by
Bisqwit on 2009-06-15 20:55:43
Page info and history | Latest diff | List referrers