OSDN Git Service

[libc] Add implementations of remquo[f|l] and remainder[f|l].
authorSiva Chandra Reddy <sivachandra@google.com>
Mon, 17 Aug 2020 23:24:45 +0000 (16:24 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Fri, 4 Sep 2020 05:00:17 +0000 (22:00 -0700)
commit8514ecb02d4330bc075b9c8fef77c87810088d2f
treeabc810b4a9be81ccbe4b1a3a0d08ffbf90137698
parent060c9dd1cc467cbeb6cf1c29dd44d07f562606b4
[libc] Add implementations of remquo[f|l] and remainder[f|l].

The implementation is not fully standards compliant in the sense that
errno is not set on error, and floating point exceptions are not raised.

Subnormal range and normal range are tested separately in the tests.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D86666
24 files changed:
libc/config/linux/api.td
libc/config/linux/x86_64/entrypoints.txt
libc/spec/stdc.td
libc/src/math/CMakeLists.txt
libc/src/math/remainder.cpp [new file with mode: 0644]
libc/src/math/remainder.h [new file with mode: 0644]
libc/src/math/remainderf.cpp [new file with mode: 0644]
libc/src/math/remainderf.h [new file with mode: 0644]
libc/src/math/remainderl.cpp [new file with mode: 0644]
libc/src/math/remainderl.h [new file with mode: 0644]
libc/src/math/remquo.cpp [new file with mode: 0644]
libc/src/math/remquo.h [new file with mode: 0644]
libc/src/math/remquof.cpp [new file with mode: 0644]
libc/src/math/remquof.h [new file with mode: 0644]
libc/src/math/remquol.cpp [new file with mode: 0644]
libc/src/math/remquol.h [new file with mode: 0644]
libc/test/src/math/CMakeLists.txt
libc/test/src/math/remquo_test.cpp [new file with mode: 0644]
libc/test/src/math/remquof_test.cpp [new file with mode: 0644]
libc/test/src/math/remquol_test.cpp [new file with mode: 0644]
libc/utils/FPUtil/CMakeLists.txt
libc/utils/FPUtil/DivisionAndRemainderOperations.h [new file with mode: 0644]
libc/utils/FPUtil/FPBits.h
libc/utils/FPUtil/LongDoubleBitsX86.h