extending the range of operator* for incoherent units with large num/den

this improves the situation for #55 (doesn't solve it outright)
motivating examples which now work are:
1q_mi * 1q_mi * 1q_mi
1q_au * 1q_au
tests added and docs updated
This commit is contained in:
Oliver Schönrock authored and Mateusz Pusz committed 2020-02-20 23:46:55 +01:00
1 parent 9fdb5822f9
commit 834d1fa09d
4 files changed
+13 -7

No files matched your search

@@ -175,4 +175,10 @@ TEST_CASE("fmt::format on synthesized unit symbols", "[text][fmt]")
{
CHECK(fmt::format("{}", 1q_in + 1q_yd) == "37 in");
}
SECTION("incoherent units with powers")
{
CHECK(fmt::format("{}", 1q_mi * 1q_mi * 1q_mi) == "1 [15900351812136/3814697265625 × 10⁹] m³");
CHECK(fmt::format("{}", 1q_au * 1q_au) == "1 [2237952291797391849 × 10⁴] m²");
}
}