[libc-commits] [libc] [libc][math][c23] fmul correcly rounded to all rounding modes (PR #91537)
via libc-commits
libc-commits at lists.llvm.org
Fri Jun 7 18:51:40 PDT 2024
================
@@ -0,0 +1,131 @@
+//===-- Implementation of fmul function------------------------------------===//
+//
+// 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 "src/math/fmul.h"
+#include "src/__support/CPP/bit.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/FPUtil/rounding_mode.h"
+#include "src/__support/common.h"
+#include "src/__support/uint128.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(float, fmul, (double x, double y)) {
+ auto x_bits = fputil::FPBits<double>(x);
+ // uint64_t x_u = x_bits.uintval();
----------------
lntue wrote:
remove the commented line.
https://github.com/llvm/llvm-project/pull/91537
More information about the libc-commits
mailing list