NameDateSize

..01-Mar-202414

aarch64/H01-Mar-202418

cosf.cH A D29-Jun-20231.4 KiB

Dir.mkH A D01-Mar-20243.6 KiB

erf.cH A D29-Jun-20236.1 KiB

erf_data.cH A D29-Jun-20233.4 KiB

erff.cH A D29-Jun-20232.6 KiB

erff_data.cH A D29-Jun-2023517

exp.cH A D29-Jun-20235.6 KiB

exp10.cH A D01-Mar-20243.5 KiB

exp2.cH A D29-Jun-20234.7 KiB

exp2f.cH A D29-Jun-20231.8 KiB

exp2f_data.cH A D29-Jun-20233.7 KiB

exp_data.cH A D01-Mar-202442.1 KiB

expf.cH A D29-Jun-20232.2 KiB

include/H01-Mar-20243

log.cH A D29-Jun-20234.5 KiB

log2.cH A D29-Jun-20233.9 KiB

log2_data.cH A D29-Jun-20237.9 KiB

log2f.cH A D29-Jun-20232 KiB

log2f_data.cH A D29-Jun-20231.1 KiB

log_data.cH A D29-Jun-202320.8 KiB

logf.cH A D29-Jun-20231.9 KiB

logf_data.cH A D29-Jun-20231.1 KiB

math_config.hH A D01-Mar-202413.5 KiB

math_err.cH A D29-Jun-20231.5 KiB

math_errf.cH A D29-Jun-20231.5 KiB

pow.cH A D29-Jun-202311.6 KiB

pow_log_data.cH A D29-Jun-202310.3 KiB

powf.cH A D29-Jun-20236 KiB

powf_log2_data.cH A D29-Jun-20231.4 KiB

README.contributorsH A D29-Jun-20233.9 KiB

sincosf.cH A D29-Jun-20231.9 KiB

sincosf.hH A D29-Jun-20234.2 KiB

sincosf_data.cH A D29-Jun-20231.6 KiB

sinf.cH A D29-Jun-20231.5 KiB

test/H01-Mar-202414

tgamma128.cH A D01-Mar-202411.8 KiB

tgamma128.hH A D01-Mar-20245.8 KiB

tools/H01-Mar-202416

README.contributors

1STYLE REQUIREMENTS
2==================
3
41. Most code in this sub-directory is expected to be upstreamed into glibc so
5   the GNU Coding Standard and glibc specific conventions should be followed
6   to ease upstreaming.
7
82. ABI and symbols: the code should be written so it is suitable for inclusion
9   into a libc with minimal changes. This e.g. means that internal symbols
10   should be hidden and in the implementation reserved namespace according to
11   ISO C and POSIX rules. If possible the built shared libraries and static
12   library archives should be usable to override libc symbols at link time (or
13   at runtime via LD_PRELOAD). This requires the symbols to follow the glibc ABI
14   (other than symbol versioning), this cannot be done reliably for static
15   linking so this is a best effort requirement.
16
173. API: include headers should be suitable for benchmarking and testing code
18   and should not conflict with libc headers.
19
20
21CONTRIBUTION GUIDELINES FOR math SUB-DIRECTORY
22==============================================
23
241. Math functions have quality and performance requirements.
25
262. Quality:
27   - Worst-case ULP error should be small in the entire input domain (for most
28     common double precision scalar functions the target is < 0.66 ULP error,
29     and < 1 ULP for single precision, even performance optimized function
30     variant should not have > 5 ULP error if the goal is to be a drop in
31     replacement for a standard math function), this should be tested
32     statistically (or on all inputs if possible in reasonable amount of time).
33     The ulp tool is for this and runulp.sh should be updated for new functions.
34
35   - All standard rounding modes need to be supported but in non-default rounding
36     modes the quality requirement can be relaxed. (Non-nearest rounded
37     computation can be slow and inaccurate but has to be correct for conformance
38     reasons.)
39
40   - Special cases and error handling need to follow ISO C Annex F requirements,
41     POSIX requirements, IEEE 754-2008 requirements and Glibc requiremnts:
42     https://www.gnu.org/software/libc/manual/html_mono/libc.html#Errors-in-Math-Functions
43     this should be tested by direct tests (glibc test system may be used for it).
44
45   - Error handling code should be decoupled from the approximation code as much
46     as possible. (There are helper functions, these take care of errno as well
47     as exception raising.)
48
49   - Vector math code does not need to work in non-nearest rounding mode and error
50     handling side effects need not happen (fenv exceptions and errno), but the
51     result should be correct (within quality requirements, which are lower for
52     vector code than for scalar code).
53
54   - Error bounds of the approximation should be clearly documented.
55
56   - The code should build and pass tests on arm, aarch64 and x86_64 GNU linux
57     systems. (Routines and features can be disabled on specific targets, but
58     the build must complete). On aarch64, both little- and big-endian targets
59     are supported as well as valid combinations of architecture extensions.
60     The configurations that should be tested depend on the contribution.
61
623. Performance:
63   - Common math code should be benchmarked on modern aarch64 microarchitectures
64     over typical inputs.
65
66   - Performance improvements should be documented (relative numbers can be
67     published; it is enough to use the mathbench microbenchmark tool which should
68     be updated for new functions).
69
70   - Attention should be paid to the compilation flags: for aarch64 fma
71     contraction should be on and math errno turned off so some builtins can be
72     inlined.
73
74   - The code should be reasonably performant on x86_64 too, e.g. some rounding
75     instructions and fma may not be available on x86_64, such builtins turn into
76     libc calls with slow code. Such slowdown is not acceptable, a faster fallback
77     should be present: glibc and bionic use the same code on all targets. (This
78     does not apply to vector math code).
79