diff --git a/src/core/include/units/magnitude.h b/src/core/include/units/magnitude.h
index c45c40a9..e4aff28b 100644
--- a/src/core/include/units/magnitude.h
+++ b/src/core/include/units/magnitude.h
@@ -588,13 +588,17 @@ constexpr Magnitude auto operator*(magnitude
, magnitude)
constexpr auto partial_product = magnitude{} * magnitude{};
if constexpr (is_same_v) {
- // Make a new power_v with the common base of H1 and H2, whose power is their powers' sum.
- constexpr auto new_head = power_v_or_T();
-
- if constexpr (get_exponent(new_head) == 0) {
- return partial_product;
+ if constexpr (get_exponent(H1) + get_exponent(H2) == 0) {
+ return magnitude<1>{};
} else {
- return magnitude{} * partial_product;
+ // Make a new power_v with the common base of H1 and H2, whose power is their powers' sum.
+ constexpr auto new_head = power_v_or_T();
+
+ if constexpr (get_exponent(new_head) == 0) {
+ return partial_product;
+ } else {
+ return magnitude{} * partial_product;
+ }
}
} else if constexpr (is_named_magnitude) {
return magnitude{} * (magnitude{} * magnitude{});