There is rounding when evaluating PoweredUnits whick have needsScaling set to true, so the following code fails the static assert in the current unit test code
constexpr physical positive(5.0); constexpr physical negative(-5.0); static_assert(positive * negative == sci::Physical<sci::PoweredUnit<UNIT,2>, double>(-25.0), "Test of multiplying Physicals (and equivalence of powered and multiplied units) failed");
This comes from converting to the baseEncoding then back again.
I feel there is probably a better way to organise the code, perhaps with a constexpr if to check equivalence of encoding that will ensure this rounding is removed
There is rounding when evaluating PoweredUnits whick have needsScaling set to true, so the following code fails the static assert in the current unit test code
constexpr physical positive(5.0); constexpr physical negative(-5.0); static_assert(positive * negative == sci::Physical<sci::PoweredUnit<UNIT,2>, double>(-25.0), "Test of multiplying Physicals (and equivalence of powered and multiplied units) failed");This comes from converting to the baseEncoding then back again.
I feel there is probably a better way to organise the code, perhaps with a constexpr if to check equivalence of encoding that will ensure this rounding is removed