ApasScript.

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.

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.

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).

valueOf Apas Cloud

The number of a quantity, in the unit it is shown in.

valueIn Apas Cloud

The number of a quantity in a given unit, exactly.

unitOf Apas Cloud

The unit a quantity is shown in, as text.

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().

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.