[libc-commits] [libc] [libc][math] Fix incorrect logic in fputil::generic::add_or_sub (PR #116129)

via libc-commits libc-commits at lists.llvm.org
Thu Dec 19 11:50:51 PST 2024


================
@@ -0,0 +1,22 @@
+//===-- Unittests for fputil::generic::sub --------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "SubTest.h"
+
+#include "src/__support/FPUtil/generic/add_sub.h"
+#include "src/__support/macros/properties/types.h"
+
+#define SUB_FUNC(T) (LIBC_NAMESPACE::fputil::generic::sub<T, T>)
+
+LIST_SUB_SAME_TYPE_TESTS(Double, double, double, SUB_FUNC(double))
+LIST_SUB_SAME_TYPE_TESTS(Float, float, float, SUB_FUNC(float))
+LIST_SUB_SAME_TYPE_TESTS(LongDouble, long double, long double,
----------------
lntue wrote:

I added MPFR support for float128.  Can you try to add float128 here to see if it works?

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


More information about the libc-commits mailing list