Changelog:
1.  `todims` now refactor as `tobase` to better indicate that the function converts to base units (like `ubase`)
2.  New LogQuant type supported with its own algebra rules (based on logarithmic identities)
3.  log(q<:Quantity) now produces a LogQuant instead of an error
4.  Callable LogScale objects like `dB` and `Np` are available (but not exported by default to prevent namespace pollution)


Current Tasks:
2.  Documentation
    -   Add simplification to the docs
        -   Add docs details about how to overload preferred_units(::Type{T}) to select different list of preferred units
        -   Useful if you are simplifying custom dimensions (like ones with angles)

4.  Enable more Units constructors to build units on the fly
    -   Units(Pair{String, <:Units}), Units(Pair{String, <:Quantity})
    -   Useful for unit registry and setting preferred units

5.  Improve simplified units display
    -   Detect spaces, "*/", and numbers (lower and upper case) in the units and wrap with brackets in the symbol generator

Backlog:
1.  hcat(v::AbstractVector{StaticDims}...) should produce a LinmapQuant with u_out = u""
    -   still need to implement vcat

2.  Move factorizations to LinearAlgebra extension
    -   implement a unitful "cholupdate!" and "choldowndate!"
    -   Look at UnitfulLinearAlgebra, and UnitfulTensors for other factorizations
    -   Add performance benchmarks


4.  Add plot recipes
    -   https://github.com/JuliaPlots/Plots.jl/blob/v2/PlotsBase/ext/UnitfulExt.jl



#Example of #3 is shown below

julia> using FlexUnits, .UnitRegistry

julia> (x, y, z) = 1u"m/s", 1u"kg", 1u"kW"
(1.0 m/s, 1.0 kg, 1000.0 (m² kg)/s³)

julia> T = Union{typeof(x),typeof(y), typeof(z)}
Union{Quantity{Float64, StaticDims{m/s}}, Quantity{Float64, StaticDims{kg}}, Quantity{Float64, StaticDims{(m² kg)/s³}}}

julia> v = T[x,y,z]
3-element Vector{Union{Quantity{Float64, StaticDims{m/s}}, Quantity{Float64, StaticDims{kg}}, Quantity{Float64, StaticDims{(m² kg)/s³}}}}:
 1.0 m/s
 1.0 kg
 1000.0 (m² kg)/s³

julia> map(x->x*2, v)
3-element Vector{Quantity{Float64}}:
 2.0 m/s
 2.0 kg
 2000.0 (m² kg)/s³

julia> map(x->x*2, [x,y,z])
3-element Vector{Quantity{Float64, Dimensions{FixRat32}}}:
 2.0 m/s
 2.0 kg
 2000.0 (m² kg)/s³

julia> collect(map(x->x*2, (x,y,z)))
3-element Vector{Quantity{Float64}}:
 2.0 m/s
 2.0 kg
 2000.0 (m² kg)/s³

julia> vcat((map(x->x*2, (x,y,z)))...)
3-element Vector{Quantity{Float64, Dimensions{FixRat32}}}:
 2.0 m/s
 2.0 kg
 2000.0 (m² kg)/s³





#====================================================================================================
Some benchmarks
====================================================================================================#
import DynamicQuantities
import Unitful
using BenchmarkTools

v1flex = ubase.([1u"m/s", 1u"J/kg", 1u"A/V"])
v1uni  = [1*Unitful.u"m/s", 1*Unitful.u"J/kg", 1*Unitful.u"A/V"]
v1dyn  = [1*DynamicQuantities.u"m/s", 1*DynamicQuantities.u"J/kg", 1*DynamicQuantities.u"A/V"]

@btime sum(x->x^0.0, v1uni)
@btime sum(x->x^0.0, v1flex)
@btime sum(x->x^0.0, v1dyn)

t1flex = ubase.((1u"m/s", 1u"J/kg", 1u"A/V"))
t1uni  = (1*Unitful.u"m/s", 1*Unitful.u"J/kg", 1*Unitful.u"A/V")
t1dyn  = (1*DynamicQuantities.u"m/s", 1*DynamicQuantities.u"J/kg", 1*DynamicQuantities.u"A/V")

@btime sum(x->x^0, t1uni)
@btime sum(x->x^0, t1flex)
@btime sum(x->x^0, t1dyn)


