[libc] Change sinf/cosf range reduction to mod pi/32 to be shared with tanf.
authorTue Ly <lntue@google.com>
Thu, 11 Aug 2022 06:14:13 +0000 (02:14 -0400)
committerTue Ly <lntue@google.com>
Thu, 11 Aug 2022 13:41:45 +0000 (09:41 -0400)
commit42f183792c8c418da7a34f1c700755dc65cafdfc
treeadbff2b650134c802b41aa3c84c55561ef5f0d37
parent13a784f368ef062a7bd652829bcf8bbdd94dc659
[libc] Change sinf/cosf range reduction to mod pi/32 to be shared with tanf.

Change sinf/cosf range reduction to mod pi/32 to be shared with tanf,
since polynomial approximations for tanf on subintervals of length pi/16 do not
provide enough accuracy.

Reviewed By: orex

Differential Revision: https://reviews.llvm.org/D131652
libc/docs/math.rst
libc/src/math/generic/cosf.cpp
libc/src/math/generic/range_reduction.h
libc/src/math/generic/range_reduction_fma.h
libc/src/math/generic/sincosf.cpp
libc/src/math/generic/sincosf_utils.h
libc/src/math/generic/sinf.cpp