2011/8/26 Michael Powell <mwpowellnm@gmail.com>
Okay that helps, yes. However, I thought this was necessarily the whole point motivating b::u, or any units library for that matter. However, when I stop to consider the whole point of b::u compile-time-type-safety, doesn't it stand to reason that some units can't necessarily find a root? Like I wouldn't want to root a m^3, this doesn't make sense to do so; even if I could, what would the unit outcome be? Although I expect I should be able to root a m^2. These are simple examples of course.


[Please don't top post]
physical quantities are well defined arithmetic objects, including rational powers. sqrt( 1.*m^3 ) = 1.*m^(3/2), there is nothing wrong with that and Boost.Units handles this very elegantly. I happens all the time, for example in intermediate calculations.