HomePhabricator

[libc] Add implementations of nearbyint[f|l].

Authored by sivachandra on Jan 1 2021, 9:19 PM.

Description

[libc] Add implementations of nearbyint[f|l].

The implementation is exactly the same as rint* as even rint does not
raise any floating point exceptions currently. [Note that the standards
do not specify that floating point exceptions must be raised - they
leave it up to the implementation to choose to raise FE_INEXACT when
rounding non-integral values.]

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D94112

Details

Committed
sivachandraJan 5 2021, 9:51 PM
Reviewer
lntue
Differential Revision
D94112: [libc] Add implementations of nearbyint[f|l].
Parents
rGcd088ba7e61a: [llvm] Use llvm::lower_bound and llvm::upper_bound (NFC)
Branches
Unknown
Tags
Unknown