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 or fraction power (V^(2/3) of a volume is an area, x^(1/3) a cube root), compared and square-rooted with the ordinary operators; a product or quotient is shown in SI units (N, J, m/s^2), except that quantities in powers of one unit keep it (ft times ft is ft^2), and a ratio of like quantities is a plain number, so it goes into exp, ln, log10, the trigonometric and inverse trigonometric functions and any power (exp(-y/H), atan(a/g), (r_2/r_1)^(3/2)); a quantity with a dimension does not. A sum or difference of two units is shown in SI units, except when the first is a US or other named unit that is not SI (5 lb + 8 oz is 11/2 lb, 1 h + 30 min is 3/2 h). 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, rev/s (rev is a revolution, a count), the CGS dyn, erg, P (poise, also written poise) and cP, or US customary units, exact by definition: in, ft, yd, mi, sq ft, acre, oz, lb, ton, fl oz, cup, pt, qt, gal, tsp, tbsp, mph, lbf, psi
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, and convert(12, "in", "ft") is 1. A temperature read on a scale is converted the same way, between "°C", "°F", "K" and "°R" (or degC, degF, degR): convert(212, "°F", "°C") is 100.
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
dimensions Apas Cloud
The dimensional formula of a quantity, [M L T^-2] for a force, in the order M, L, T, A, K, mol, cd; a pure number is [M^0 L^0 T^0]. Each power is readable: dimensions(F).T is -2.
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