Prefix(name, abbrev, exponent, base) is SymPy's prefix with scale factor
base^exponent, such as kilo (10^3) or kibi (2^10). A prefix times
a quantity gives the scaled quantity, and products and quotients of
prefixes simplify to a prefix or a number, as in sympy.physics.units.
The predefined prefixes are in physics_units(), with the dictionaries
PREFIXES and BIN_PREFIXES. prefix_unit(unit, prefixes) returns the
prefixed units of unit for a named list of prefixes. scale_factor()
gives the scale factor of a prefix or of a quantity in the SI system.
Usage
Prefix(name, abbrev, exponent, base = 10, latex_repr = NULL)
scale_factor(x)
prefix_unit(unit, prefixes)Examples
u <- physics_units()
u$kilo * u$meter
#> 1000*meter
u$kilo * u$kilo
#> M
prefix_unit(u$meter, u$PREFIXES[c("m", "c")])
#> [[1]]
#> millimeter
#>
#> [[2]]
#> centimeter
#>