W Z
The rational type right now has a numerator and a denominator, both are long type. I would like to support operations with rational numbers only to keep the number representation precise, so no double types should be involved.
I first tried to get scaled units working with rational numbers. However, make_scaled_units takes in a scale and then internally returns a double value as a scale. I then wrote my own scale class but it's only partially working (conversion works one way only). It just seems like boost.units has a lot of places internally that use double as scale factors and conversion factors, and I'm looking for a cleaner way to make units library support rational numbers without re-writing a lot of code. Any idea would be greatly appreciated!
I've only just started looking at Boost.Unit, but your comments made me
wonder if you're specifying the second template parameter to quantity.
The boost/units/quantity.hpp file has
template