[libc-commits] [libc] [libc] Add mpfr tests for fmul. (PR #97376)
via libc-commits
libc-commits at lists.llvm.org
Mon Jul 1 20:15:41 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff fb6e024f49ddbf1a018eccab7ccfa7c1f41964d0 df2defd205622564e6cba914d4c750238fbfc355 -- libc/test/src/math/FMulTest.h libc/test/src/math/fmul_test.cpp libc/utils/MPFRWrapper/MPFRUtils.cpp libc/utils/MPFRWrapper/MPFRUtils.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp
index 6c92fd0b03..638f2e2e9f 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.cpp
+++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp
@@ -961,7 +961,7 @@ template void explain_binary_operation_one_output_error<long double>(
template void explain_binary_operation_one_output_error(
Operation, const BinaryInput<double> &, float, double, RoundingMode);
-
+
template <typename InputType, typename OutputType>
void explain_ternary_operation_one_output_error(
Operation op, const TernaryInput<InputType> &input, OutputType libc_result,
@@ -1124,10 +1124,7 @@ template bool compare_binary_operation_one_output<long double>(
Operation, const BinaryInput<long double> &, long double, double,
RoundingMode);
template bool compare_binary_operation_one_output<double>(
- Operation, const BinaryInput<double> &, float, double,
- RoundingMode);
-
-
+ Operation, const BinaryInput<double> &, float, double, RoundingMode);
template <typename InputType, typename OutputType>
bool compare_ternary_operation_one_output(Operation op,
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.h b/libc/utils/MPFRWrapper/MPFRUtils.h
index 2df445341b..3f5410ffa6 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.h
+++ b/libc/utils/MPFRWrapper/MPFRUtils.h
@@ -148,7 +148,6 @@ template <typename T> struct IsTernaryInput<TernaryInput<T>> {
static constexpr bool VALUE = true;
};
-
template <typename T> struct IsBinaryInput<BinaryInput<T>> {
static constexpr bool VALUE = true;
};
@@ -315,7 +314,7 @@ constexpr bool is_valid_operation() {
(op == Operation::Sqrt && cpp::is_floating_point_v<InputType> &&
cpp::is_floating_point_v<OutputType> &&
sizeof(OutputType) <= sizeof(InputType)) ||
- (op == Operation::Div && internal::IsBinaryInput<InputType>::VALUE &&
+ (op == Operation::Div && internal::IsBinaryInput<InputType>::VALUE &&
cpp::is_floating_point_v<
typename internal::MakeScalarInput<InputType>::type> &&
cpp::is_floating_point_v<OutputType>) ||
``````````
</details>
https://github.com/llvm/llvm-project/pull/97376
More information about the libc-commits
mailing list