Units
These are Apas Cloud services: they run on our servers for a signed-in member. The examples below are shown already made; sign in to edit and run your own.
quantity Apas Cloud
A number with a unit. It is kept exactly (72 km/h is exactly 20 m/s inside) and shown in the unit it was written in. Quantities are added, subtracted, multiplied, divided, raised to a whole power, compared and square-rooted with the ordinary operators; a product or quotient is shown in SI units (N, J, m/s^2), and a ratio of like quantities is a plain number. Adding a length to a time is an error. Read the parts with q.value, q.unit and q.si.
value (number) -- The number, in the given unit
unit (string) -- A unit as text: SI units and prefixes ("km/h", "m/s^2", "kg*m/s^2", "J/(mol*K)", "µF", "kΩ") or min, h, day, t, L, angstrom, eV, kWh, cal, atm, bar, mmHg, torr, rpm
convert Apas Cloud
A quantity shown in another unit of the same dimension, exactly: convert(q, "km"). With three arguments it converts a plain number and returns a number: convert(72, "km/h", "m/s") is 20.
q (quantity) -- The quantity (or, with three arguments, a number in the unit that follows)
unit (string) -- The unit to show it in
toSI Apas Cloud
A quantity shown in coherent SI units: metres, kilograms, seconds and the units named from them (N, J, W, Pa, C, V, Ω, F, Hz).
q (quantity) -- The quantity
valueOf Apas Cloud
The number of a quantity, in the unit it is shown in.
q (quantity) -- The quantity
valueIn Apas Cloud
The number of a quantity in a given unit, exactly.
q (quantity) -- The quantity
unit (string) -- A unit of the same dimension
unitOf Apas Cloud
The unit a quantity is shown in, as text.
q (quantity) -- The quantity
constant Apas Cloud
A physical constant as a quantity, by its symbol: c, h, hbar, e, k_B, N_A, R, F, G, g_n (or g), atm, eV, m_e, m_p, m_n, u, eps0, mu0, k_e. The constants that define the SI (c, h, e, k_B, N_A) and those computed from them (R, F) are exact; the others are the CODATA 2022 values. Show one with decimal() or scientific().
symbol (string) -- The constant's symbol
uncertainty Apas Cloud
The standard uncertainty of a measured constant (CODATA 2022) as a quantity, or the text "exact" for a constant that is exact in the SI.
symbol (string) -- The constant's symbol