blob: e9e1ea14d1d74f875ea940439d6e7776898d6ac0 [file] [log] [blame]
//===-- Implementation of lrintf 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/lrintf.h"
#include "src/__support/common.h"
#include "utils/FPUtil/NearestIntegerOperations.h"
namespace __llvm_libc {
LLVM_LIBC_FUNCTION(long, lrintf, (float x)) {
return fputil::roundToSignedIntegerUsingCurrentRoundingMode<float, long>(x);
}
} // namespace __llvm_libc