Units

Units represent measurable quantities such as length, mass, time, temperature, or currency. In Corca, units are attached directly to numbers, variables, and constants. They behave as structured properties rather than plain text, which allows calculations to preserve and propagate units automatically.

Units remain editable and visible in the right panel.

Creating a value with units

You create a unit simply by typing it next to a number: distance=10m distance equals 10 meters. The variable distance distance now carries this unit as a property.

Units as variable properties

When a variable is assigned a value with a unit, the unit becomes part of the variable definition: mass=5kg mass equals 5 kilograms

This means:

  • The unit is stored with the variable

  • The unit persists across calculations

  • The unit updates automatically if the value changes

Editing units

Units can be modified directly. Original: speed=20m/s speed equals 20 meters divided by seconds. Click on the units and just type what you need: speed=20km/h speed equals 20 kilometers divided by hours

You can also edit the unit from the right panel.

Converting between units

Select a value that carries a unit and use the Convert to field in the right panel to express it in another compatible unit. Converting 1000 m to km rewrites the value as 1 km; the quantity is unchanged, only the unit it is written in.

Only compatible units are offered — you can convert metres to kilometres or feet, but not to kilograms.

Typing a unit

Type a unit straight after a number — 10kg — and accept the suggestion. The cursor stays inside the unit brackets afterwards, so you can keep typing to build a compound unit such as m/s without navigating back in.

While the cursor is inside unit brackets, only unit suggestions are offered, so a function or symbol of the same name won't be proposed where a unit belongs.

Prefix and postfix units

Units can appear before or after numbers depending on convention.

Type

Example

Typical use

Postfix

10kg 10 kilograms

Physical quantities

Prefix

$100 100 dollars

Currency

Postfix temperature

25°C 25 Celsius

Temperature

Mixed expression

$5⋅3 5 dollars times 3

Currency arithmetic

Both forms are recognized automatically.

Multiple values with units

You can use several values with units in a single expression: t=2kg+3kg=5kg t equals 2 kilograms plus 3 kilograms equals 5 kilograms.

Units are preserved during arithmetic.

Units in calculations

Units propagate through mathematical operations: ƒ=m⁢a f with hook equals m a with:

m=2kg m equals 2 kilograms

a=3m/s2 a equals 3 meters divided by seconds to the second power

The result will be computed automatically:

ƒ=6N f with hook equals 6 Newtons

Units with powers

Units can be attached to values that include exponents: S=102m2 S equals 10 squared square meters. This applies to:

  • squared quantities

  • cubic quantities

  • scientific notation

Units in hints and results

Units are carried through calculations automatically:

S=100m S equals 100 meters

t=10s t equals 10 seconds

V=St=10m/s V equals S over t equals 10 meters divided by seconds

Units in imported content

Units are detected automatically when content is pasted.

10kg

The value becomes: 10kg 10 kilograms. The unit is separated and stored as a structured property.

Percentages and ratios

Percent and its relatives are treated as dimensionless ratios rather than units, so they behave the way they do in ordinary arithmetic.

  • % percent — 100×5% 100 times 5 percent is 5 5, and 10%+19% 10 percent plus 19 percent is 29% 29 percent

  • ‰ per mille — 100×5‰ 100 times 5 per mille is 0.5 0.5

  • ‱ basis point — 100×5‱ 100 times 5 per ten thousand is 0.05 0.05

A ratio is kept in the result only when both sides of the operation share the same symbol — 10%+19% 10 percent plus 19 percent stays a percentage, while 100×5% 100 times 5 percent resolves to a plain number.

Engineering imperial units

Alongside the SI and common imperial units, Corca recognizes the units used in structural and mechanical engineering:

  • lbf, kip — force

  • klf, plf — load per unit length

  • ksi, psf, ksf — pressure and stress

  • pcf — density

These propagate through calculations like any other unit.

Previous: Inequalities