llvm-project/libc/docs
Tue Ly 15b9380dfd [libc] Change sinf range reduction to mod pi/16 to be shared with cosf.
Change `sinf` range reduction to mod pi/16 to be shared with `cosf`.

Previously, `sinf` used range reduction `mod pi`, but this cannot be used to implement `cosf` since the minimax algorithm for `cosf` does not converge due to critical points at `pi/2`.  In order to be able to share the same range reduction functions for both `sinf` and `cosf`, we change the range reduction to `mod pi/16` for the following reasons:
- The table size is sufficiently small: 32 entries for `sin(k * pi/16)` with `k = 0..31`.  It could be reduced to 16 entries if we treat the final sign separately, with an extra multiplication at the end.
- The polynomials' degrees are reduced to 7/8 from 15, with extra computations to combine `sin` and `cos` with trig sum equality.
- The number of exceptional cases reduced to 2 (with FMA) and 3 (without FMA).
- The latency is reduced while maintaining similar throughput as before.

Reviewed By: zimmermann6

Differential Revision: https://reviews.llvm.org/D130629
2022-07-27 12:23:36 -04:00
..
CMakeLists.txt Move LLVM Proposal to doc directory, create index 2022-01-29 00:29:31 +00:00
README.txt Move LLVM Proposal to doc directory, create index 2022-01-29 00:29:31 +00:00
api_test.rst [libc] Rename libc-integration-test to libc-api-test. 2022-03-23 20:25:34 +00:00
build_system.rst
clang_tidy_checks.rst [libc][clang-tidy] fix namespace check for externals 2021-11-30 11:44:24 -08:00
conf.py Move LLVM Proposal to doc directory, create index 2022-01-29 00:29:31 +00:00
entrypoints.rst
fuzzing.rst [libc][docs] Update the fuzzing doc to better reflect the current state. 2022-04-20 15:33:20 +00:00
ground_truth_specification.rst
header_gen_scheme.svg
header_generation.rst [libc] NFC: Fix trivial typo in comments, documents, and messages 2020-04-06 16:19:34 +09:00
implementation_standard.rst [libc] NFC: Fix trivial typo in comments, documents, and messages 2020-04-06 16:19:34 +09:00
index.rst [libc] Add a status page for math functions. 2022-06-16 17:41:46 -04:00
layering.rst Rewrite much of the index page for libc 2022-02-16 03:46:20 +00:00
math.rst [libc] Change sinf range reduction to mod pi/16 to be shared with cosf. 2022-07-27 12:23:36 -04:00
mechanics_of_public_api.rst
redirectors.rst Move LLVM Proposal to doc directory, create index 2022-01-29 00:29:31 +00:00
redirectors_schematic.svg
runtimes_build.rst [libc] Add a doc describing the current status of libc runtimes build. 2022-04-18 06:48:43 +00:00
source_layout.rst [libc][docs] Use same formatting for headers in source_layout 2022-05-23 21:47:22 +00:00
stdio.rst [libc][docs] Add doc for libc stdio functions 2022-05-12 13:02:23 -07:00
strings.rst [libc][docs] Add doc for libc stdio functions 2022-05-12 13:02:23 -07:00

README.txt

libc Documentation
==================

The libc documentation is written using the Sphinx documentation generator. It is
currently tested with Sphinx 1.1.3.

To build the documents into html configure libc with the following cmake options:

  * -DLLVM_ENABLE_SPHINX=ON
  * -DLIBC_INCLUDE_DOCS=ON

After configuring libc with these options the make rule `docs-libc-html`
should be available.