[libc] Add implementations of nearbyint[f|l].
authorSiva Chandra Reddy <sivachandra@google.com>
Sat, 2 Jan 2021 05:19:31 +0000 (21:19 -0800)
committerSiva Chandra Reddy <sivachandra@google.com>
Wed, 6 Jan 2021 05:51:10 +0000 (21:51 -0800)
commit993d8ac5cb935b78fb136c25a7e4bae18852f429
tree690eae4acc98330228e64b9a6e753604db6822a2
parentcd088ba7e61a6132659d066918a1175861c9afe7
[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
libc/config/linux/x86_64/entrypoints.txt
libc/spec/stdc.td
libc/src/math/CMakeLists.txt
libc/src/math/nearbyint.cpp [new file with mode: 0644]
libc/src/math/nearbyint.h [new file with mode: 0644]
libc/src/math/nearbyintf.cpp [new file with mode: 0644]
libc/src/math/nearbyintf.h [new file with mode: 0644]
libc/src/math/nearbyintl.cpp [new file with mode: 0644]
libc/src/math/nearbyintl.h [new file with mode: 0644]