There are two main ways to make physical quantities: the function `make-pq`

, and the reader macro `#_`

ANTIK-USER> (make-pq 24.5d0 'm/s) #_24.500000000000000d0_m/s ANTIK-USER> #_24.5_m/s #_24.500000000000000d0_m/s

To get the magnitude and units of a physical quantity, use `pqval`

. It returns three values: the magnitude, units, and whether a single unit expression applies to all elements of the grid magnitude:

ANTIK-USER> (pqval #_24.5_m/s) 24.5 (/ METER SECOND) T ANTIK-USER> (pqval #m(#_1.0_km #_2.0_s #_3.0_kg)) #m(1000.000000000000000d0 2.000000000000000d0 3.000000000000000d0) #(METER SECOND KILOGRAM) NIL

— Class: **antik:physical-quantity**

Class precedence list:

`physical-quantity, standard-object, t`

A quantity with a dimension and possibly a unit, e.g. length or meter.

— Function: **antik:check-dimension**` obj units &optional errorp zeros-have-any-dimension`

- obj is a pdq and units have the same dimension as obj,
- obj is zero and zeros-have-any-dimension is
`t`

,- obj and units represent a dimensionless quantity,
- obj and units are grids of the same length, and for each pair of corresponding elements, one of the above is true.

— Function: **antik:make-pq**` magnitude unit-expression &optional scalar-dimension`

Make a physical dimension quantity (PDQ). Allow for the possiblity that magnitude is already a

`pdq`

; in this case, check that the physical dimension is correct, and pass it on. This can be used as a way of assigning default units to a number. Unitless dimensions (e.g., 'length) are interpeted as units in the :system-of-units. If scalar-dimension is`t`

and magnitude is not a scalar, the unit-expression applies to each element of the magnitude. Otherwise it must be a grid or list of the shape as the magnitude.

— Generic Function: **antik:pqval**` pq`

Get the numerical value and the units of the physical dimension quantity. Returns the magnitude, the units, and whether units are the same for each element of a sequence or grid.