[libc-commits] [libc] [libc][math][c23] Add cospif16 function (PR #113001)
via libc-commits
libc-commits at lists.llvm.org
Tue Oct 29 01:45:51 PDT 2024
================
@@ -68,8 +36,8 @@ LLVM_LIBC_FUNCTION(float16, sinpif16, (float16 x)) {
// Once k and y are computed, we then deduce the answer by the sine of sum
// formula:
// sin(x * pi) = sin((k + y) * pi/32)
- // = sin(k * pi/32) * cos(y * pi/32) + sin (y * pi/32) * cos (k *
- // pi/32)
+ // = sin(k * pi/32) * cos(y * pi/32)
+ // + sin (y * pi/32) * cos (k * pi/32)
// The values of sin(k * pi/32) and cos (k * pi/32) for k = 0...63 are
// precomputed and stored using a vector of 64 single precision floats. sin(y
// * pi/32) and cos(y * pi/32) are computed using degree-9 chebyshev
----------------
overmighty wrote:
Similar formatting nits as for `cospif16`. If it's the same explanation for both then you could just have it in the shared header only.
https://github.com/llvm/llvm-project/pull/113001
More information about the libc-commits
mailing list