[libc-commits] [libc] [libc][math][c23] Add f16sqrtf C23 math function (PR #95251)

via libc-commits libc-commits at lists.llvm.org
Wed Jun 12 08:34:38 PDT 2024


================
@@ -757,26 +757,32 @@ ternary_operation_one_output(Operation op, InputType x, InputType y,
 // to build the complete error messages before sending it to the outstream `OS`
 // once at the end.  This will stop the error messages from interleaving when
 // the tests are running concurrently.
-template <typename T>
-void explain_unary_operation_single_output_error(Operation op, T input,
-                                                 T matchValue,
+template <typename InputType, typename OutputType>
+void explain_unary_operation_single_output_error(Operation op, InputType input,
+                                                 OutputType matchValue,
                                                  double ulp_tolerance,
                                                  RoundingMode rounding) {
-  unsigned int precision = get_precision<T>(ulp_tolerance);
+  unsigned int precision = get_precision<InputType>(ulp_tolerance);
   MPFRNumber mpfrInput(input, precision);
   MPFRNumber mpfr_result;
   mpfr_result = unary_operation(op, input, precision, rounding);
----------------
overmighty wrote:

Not written by me, but the naming/case isn't consistent, and the assignment could be merged with the declaration.

https://github.com/llvm/llvm-project/pull/95251


More information about the libc-commits mailing list