IEEE_RINT rounds a real value to an integer-valued real. IEEE_INT rounds a real value to an integer value. The primary IEEE_INT result is generated with a call to IEEE_RINT.
23 lines
668 B
C++
23 lines
668 B
C++
//===-- runtime/Float128Math/nearbyint.cpp --------------------------------===//
|
|
//
|
|
// 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 "math-entries.h"
|
|
|
|
namespace Fortran::runtime {
|
|
extern "C" {
|
|
|
|
#if HAS_LDBL128 || HAS_FLOAT128
|
|
CppTypeFor<TypeCategory::Real, 16> RTDEF(NearbyintF128)(
|
|
CppTypeFor<TypeCategory::Real, 16> x) {
|
|
return Nearbyint<true>::invoke(x);
|
|
}
|
|
#endif
|
|
|
|
} // extern "C"
|
|
} // namespace Fortran::runtime
|