Add clarifying parenthesis around non-trivial conditions in ternary expressions. (#90391)

Fixes [#85868](https://github.com/llvm/llvm-project/issues/85868)

Parenthesis are added as requested on ternary operators with non trivial conditions.

I used this [precedence table](https://en.cppreference.com/w/cpp/language/operator_precedence) for reference, to make sure we get the expected behavior on each change.

GitOrigin-RevId: a98a6e95be1be9a5c28da15b4d19a6f39872461d
diff --git a/generic/lib/math/log_base.h b/generic/lib/math/log_base.h
index f5b6f1c..2558f01 100644
--- a/generic/lib/math/log_base.h
+++ b/generic/lib/math/log_base.h
@@ -289,7 +289,7 @@
     double ret = is_near ? ret_near : ret_far;
 
     ret = isinf(x) ? as_double(PINFBITPATT_DP64) : ret;
-    ret = isnan(x) | (x < 0.0) ? as_double(QNANBITPATT_DP64) : ret;
+    ret = (isnan(x) | (x < 0.0)) ? as_double(QNANBITPATT_DP64) : ret;
     ret = x == 0.0 ? as_double(NINFBITPATT_DP64) : ret;
     return ret;
 }