📏Unit Expression Rules
Calcumber understands quantities consisting of a dimensionless magnitude and a unit expression that can be written in a natural way. However some rules are needed to prevent misinterpretation of unit symbols as variables.
✅ OK | ❌ Not OK | 📌 Rule |
---|---|---|
1 m | 1m | Use a space between magnitude and unit. |
1 W/(m^2*K) | 1 W / (m^2*K) | Don’t use spaces within a unit. |
3m * 2 m | 3 m*2 m | Use a space between unit and succeeding operator. |
1 W/m^2*K | In units, multiplication * has higher precedence than division / . Brackets are optional. | |
60 m3 | 50 s-1 | For positive integer exponents, the operator ^ can be omitted. |
1 W/m2K | 1 W/m^2K | After a short-form exponentiated unit, multiplication * can be omitted. |
📏Predefined Units in Calcumber
Calcumber comes with a rich set of predefined units — including SI base units, derived units, common non-SI units.
🧱 SI Base Units
Any unit that is not defined in terms of other units is treated as a base unit in Calcumber. This includes the standard SI base units:
s
– second (time)
m
– metre (length)
kg
– kilogram (mass)
A
– ampere (electric current)
K
– kelvin (temperature)
mol
– mole (amount of substance)
cd
– candela (luminous intensity)
🔧 Derived SI Units
These are defined in terms of the base units and commonly used in science and engineering:
Unit | Name | Definition |
---|---|---|
rad | radian | 1 (angle) |
sr | steradian | 1 (solid angle) |
Hz | hertz | 1/s |
N | newton | kg*m/s^2 |
Pa | pascal | N/m^2 |
J | joule | N*m |
W | watt | J/s |
C | coulomb | A*s |
V | volt | J/C |
F | farad | C/V |
Ohm | ohm | V/A |
S | siemens | 1/Ohm |
Wb | weber | V*s |
T | tesla | Wb/m^2 |
H | henry | Wb/A |
lm | lumen | cd*sr |
lx | lux | lm/m^2 |
Bq | becquerel | 1/s |
Gy | gray | J/kg |
Sv | sievert | J/kg |
kat | katal | mol/s |
⏱ Non-SI Units Accepted with SI
These are widely used and accepted in scientific and technical fields:
Unit | Name | Definition |
---|---|---|
min | minute | 60 s |
h | hour | 60 min |
d | day | 24 h |
au | astronomical unit | 149,597,870,700 m |
deg | degree | π/180 rad |
arcmin | arcminute | 1/60 deg |
arcsec | arcsecond | 1/60 arcmin |
ha | hectare | 10,000 m² |
L | litre | 0.001 m³ |
t | tonne (metric ton) | 1000 kg |
Da | dalton | 1.66053906892e-27 kg |
eV | electronvolt | 1.602176634e-19 J |
📏 Additional Metric Units
Unit | Description | Definition |
---|---|---|
are | area unit | 100 m² |
dioptre | lens power | 1/m |
bar | pressure unit | 100000 Pa |
🧪 Other Predefined Units
Unit | Description | Definition |
---|---|---|
year | Calendar year (approximate) | 365.25 d |
month | Month (approximate) | 1/12 year |
week | Week | 7 d |
Wh | Watt hour | W*h |
🇬🇧 Imperial and US Customary Units
Unit | Description | Definition |
---|---|---|
in | inch | 0.0254 m |
ft | foot | 12 in |
yd | yard | 3 ft |
mi | mile | 5280 ft |
mil | thou (thousandth of inch) | 0.001 in |
ac | acre | 43560 ft² |
gal | US gallon | 3.785411784 L |
qt | US quart | gal / 4 |
pt | US pint | qt / 2 |
cup | US cup (approximate) | 0.24 L |
floz | US fluid ounce | gal / 128 |
tbsp | tablespoon | floz / 2 |
tsp | teaspoon | tbsp / 3 |
lb | pound | 0.45359237 kg |
oz | ounce | lb / 16 |
st | stone | 14 lb |
ton_us | US ton | 2000 lb |
ton_uk | UK long ton | 2240 lb |
lbf | pound-force | 4.4482216152605 N |
psi | pounds per square inch | lbf / in² |
atm | standard atmosphere | 101325 Pa |
°F | Fahrenheit (differential) | 5/9 K |
mph | miles per hour | mi / h |
fps | feet per second | ft / s |
kt | knot | 1852 m / h |
BTU | British thermal unit | 1055.05585262 J |
cal | calorie | 4.184 J |
Cal | calorie on food labels | 1 kcal |
☕Implicit Units / User Defined Units
Calcumber treats any undefined unit as a base unit — even if it’s something like coffee
, EUR
, or bean
. These units don’t need to be pre-defined, and Calcumber will still allow meaningful calculations and unit cancellations.
7 coffe/day * 0.5 EUR/coffee
➔ 3.5 EUR/day
use year
➔ 1278.375 EUR/year
Even though coffee
and EUR
are not built-in units, Calcumber:
Cancels out coffee
correctly
Recognizes day
and converts it to year
So yes — you can calculate your yearly caffeine budget, even in undefined units. Coffee may come at a price — but at least it’s healthier than 1278 lbpy (liters beer per year 😉).
🪄Commands for Unit Manipulation
ubase
Converts to base units:
ubase 5 N
→ 5 kg*m^2/s^2
Without arguments, ubase
coverts the last result to base units:
10 m/s^2 * 0.5 kg
→ 5 N
ubase
→ 5 kg*m/s^2
use
Tells Calcumber what unit to use.
Syntax:
use unit, [expression]
Writes expression
using a power of the specified unit times a base unit remainder:
expression
→ magnitude unit^n*remainder
.
Examples:
use N, 30 J
→ 30 m*N
use kWh, 9 MJ
→ 2.5 kWh
use A, 9 MJ
→ 9000000 kg*m^2/s^2
(Joule does not contain Ampère in its definition)
use s, 50 Hz
→ 50 1/s
use m, 200 L
→ 0.2 m^3
If expression is omitted, use
applies to the last result:
50 L/min * 34 min
→ 1700 L
use m
→ 1.7 m^3