| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc][math] fmod/fmodf implementation. This is a implementation of find remainder fmod function from standard libm. The underline algorithm is developed by myself, but probably it was first invented before. Some features of the implementation: 1. The code is written on more-or-less modern C++. 2. One general implementation for both float and double precision numbers. 3. Spitted platform/architecture dependent and independent code and tests. 4. Tests covers 100% of the code for both float and double numbers. Tests cases with NaN/Inf etc is copied from glibc. 5. The new implementation in general 2-4 times faster for “regular” x,y values. It can be 20 times faster for x/y huge value, but can also be 2 times slower for double denormalized range (according to perf tests provided). 6. Two different implementation of division loop are provided. In some platforms division can be very time consuming operation. Depend on platform it can be 3-10 times slower than multiplication. Performance tests: The test is based on core-math project (https://gitlab.inria.fr/core-math/core-math). By Tue Ly suggestion I took hypot function and use it as template for fmod. Preserving all test cases. ./check.sh <--special|--worst> fmodf passed. CORE_MATH_PERF_MODE=rdtsc ./perf.sh fmodf results are GNU libc version: 2.35 GNU libc release: stable 21.166 <-- FPU 51.031 <-- current glibc 37.659 <-- this fmod version. | 3 年前 | |
[libc] Implement sinf function that is correctly rounded to all rounding modes. Implement sinf function that is correctly rounded to all rounding modes. - We use a simple range reduction for pi/16 < |x| : Let k = round(x / pi) and y = (x/pi) - k. So k is an integer and -0.5 <= y <= 0.5. Then sin(x) = sin(y*pi + k*pi) = (-1)^(k & 1) * sin(y*pi) ~ (-1)^(k & 1) * y * P(y^2) where y*P(y^2) is a degree-15 minimax polynomial generated by Sollya with: > P = fpminimax(sin(x*pi)/x, [|0, 2, 4, 6, 8, 10, 12, 14|], [|D...|], [0, 0.5]); - Performance benchmark using perf tool from CORE-MATH project (https://gitlab.inria.fr/core-math/core-math/-/tree/master) on Ryzen 1700: Before this patch (not correctly rounded): $ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh sinf CORE-MATH reciprocal throughput : 17.892 System LIBC reciprocal throughput : 25.559 LIBC reciprocal throughput : 29.381 After this patch (correctly rounded): `` $ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh sinf CORE-MATH reciprocal throughput : 17.896 System LIBC reciprocal throughput : 25.740 LIBC reciprocal throughput : 27.872 LIBC reciprocal throughput : 20.012 (with -msse4.2 flag) LIBC reciprocal throughput : 14.244 (with -mfma flag) `` Reviewed By: zimmermann6 Differential Revision: https://reviews.llvm.org/D123154 | 3 年前 | |
[libc][nfc] move ctype_utils and FPUtils to __support Some ctype functions are called from other libc functions (e.g. isspace is used in atoi). By moving ctype_utils.h to __support it becomes easier to include just the implementations of these functions. For these reasons the implementation for isspace was moved into ctype_utils as well. FPUtils was moved to simplify the build order, and to clarify which files are a part of the actual libc. Many files were modified to accomodate these changes, mostly changing the #include paths. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D107600 | 4 年前 | |
[libc] add dependencies to generic sqrt tests This adds dependencies on the corresponding sqrt function to each generic sqrt test. This is so that on platforms that don't support the math functions, the tests are not run. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D129388 | 3 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc][math] fmod/fmodf implementation. This is a implementation of find remainder fmod function from standard libm. The underline algorithm is developed by myself, but probably it was first invented before. Some features of the implementation: 1. The code is written on more-or-less modern C++. 2. One general implementation for both float and double precision numbers. 3. Spitted platform/architecture dependent and independent code and tests. 4. Tests covers 100% of the code for both float and double numbers. Tests cases with NaN/Inf etc is copied from glibc. 5. The new implementation in general 2-4 times faster for “regular” x,y values. It can be 20 times faster for x/y huge value, but can also be 2 times slower for double denormalized range (according to perf tests provided). 6. Two different implementation of division loop are provided. In some platforms division can be very time consuming operation. Depend on platform it can be 3-10 times slower than multiplication. Performance tests: The test is based on core-math project (https://gitlab.inria.fr/core-math/core-math). By Tue Ly suggestion I took hypot function and use it as template for fmod. Preserving all test cases. ./check.sh <--special|--worst> fmodf passed. CORE_MATH_PERF_MODE=rdtsc ./perf.sh fmodf results are GNU libc version: 2.35 GNU libc release: stable 21.166 <-- FPU 51.031 <-- current glibc 37.659 <-- this fmod version. | 3 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] Implement double precision FMA for targets without FMA instructions. Implement double precision FMA (Fused Multiply-Add) for targets without FMA instructions using __uint128_t to store the intermediate results. Reviewed By: michaelrj, sivachandra Differential Revision: https://reviews.llvm.org/D124495 | 3 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] Implement correct rounding with all rounding modes for hypot functions. Update the rounding logic for generic hypot function so that it will round correctly with all rounding modes. Reviewed By: sivachandra, zimmermann6 Differential Revision: https://reviews.llvm.org/D117590 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] Replace type punning with bit_cast Although type punning is defined for union in C, it is UB in C++. This patch introduces a bit_cast function to convert between types in a safe way. This is necessary to get llvm-libc compile with GCC. This patch is extracted from D119002. Differential Revision: https://reviews.llvm.org/D119145 | 4 年前 | |
[libc] Remove the redundant header FPUtil/FEnvUtils.h Remove the redundant header FPUtil/FEnvUtils.h, use FPUtil/FEnvImpl.h header instead. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D120965 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] Initial support for darwin-aarch64. Add initial support for darwin-aarch64 (macOS M1). Some differences compared to linux-aarch64: - math.h defined math_errhandling by the compiler builtin __math_errhandling() but Apple Clang 13.0.0 on M1 does not support __math_errhandling() builtin as a macro function or a constexpr function. - math.h defines UNDERFLOW and OVERFLOW macros. - Besides 5 usual floating point exceptions: FE_INEXACT, FE_UNDERFLOW, FE_OVERFLOW, FE_DIVBYZERO, and FE_INVALID, fenv.h also has another floating point exception: FE_FLUSHTOZERO. The corresponding trap for FE_FLUSHTOZERO in the control register is at the different location compared to the status register. - FE_FLUSHTOZERO exception flag cannot be raised with the default CPU floating point operation mode. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D120914 | 4 年前 | |
[libc] Replace type punning with bit_cast Although type punning is defined for union in C, it is UB in C++. This patch introduces a bit_cast function to convert between types in a safe way. This is necessary to get llvm-libc compile with GCC. This patch is extracted from D119002. Differential Revision: https://reviews.llvm.org/D119145 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] Add testing macros for errno and floating point exceptions. Add testing macros for errno and floating point exceptions. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D121235 | 4 年前 | |
[libc] Improve the performance of exp2f. Reduce the range-reduction table size from 128 entries down to 64 entries, and reduce the polynomial's degree from 6 down to 4. Currently we use a degree-6 minimax polynomial on an interval of length 2^-7 around 0 to compute exp2f. Based on the suggestion of @santoshn and the RLIBM project (https://github.com/rutgers-apl/rlibm-prog/blob/main/libm/float/exp2.c) it is possible to have a good polynomial of degree-4 on a subinterval of length 2^(-6) to approximate 2^x. We did try to either reduce the degree of the polynomial down to 3 or increase the interval size to 2^(-5), but in both cases the number of exceptional values exploded. So we settle with using a degree-4 polynomial of the interval of size 2^(-6) around 0. Reviewed By: michaelrj, sivachandra, zimmermann6, santoshn Differential Revision: https://reviews.llvm.org/D122346 | 4 年前 | |
[libc] Improve the performance of expf. Reduce the polynomial's degree from 7 down to 4. Currently we use a degree-7 minimax polynomial on an interval of length 2^-7 around 0 to compute expf. Based on the suggestion of @santoshn and the RLIBM project (https://github.com/rutgers-apl/rlibm-all/blob/main/source/float/exp.c) and the improvement we made with exp2f in https://reviews.llvm.org/D122346, it is possible to have a good polynomial of degree-4 on a subinterval of length 2^(-7) to approximate e^x. We did try to either reduce the degree of the polynomial down to 3 or increase the interval size to 2^(-6), but in both cases the number of exceptional values exploded. So we settle with using a degree-4 polynomial of the interval of size 2^(-7) around 0. Reviewed By: sivachandra, zimmermann6, santoshn Differential Revision: https://reviews.llvm.org/D122418 | 4 年前 | |
[libc] Make expm1f correctly rounded when the targets have no FMA instructions. Add another exceptional value and fix the case when |x| is small. Performance tests with CORE-MATH project scripts: With FMA instructions on Ryzen 1700: $ ./perf.sh expm1f LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a CORE-MATH reciprocal throughput : 15.362 System LIBC reciprocal throughput : 53.194 LIBC reciprocal throughput : 14.595 $ ./perf.sh expm1f --latency LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a CORE-MATH latency : 57.755 System LIBC latency : 147.020 LIBC latency : 60.269 Without FMA instructions: $ ./perf.sh expm1f LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a CORE-MATH reciprocal throughput : 15.362 System LIBC reciprocal throughput : 53.300 LIBC reciprocal throughput : 18.020 $ ./perf.sh expm1f --latency LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a CORE-MATH latency : 57.758 System LIBC latency : 147.025 LIBC latency : 70.304 Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D123440 | 3 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc] Implement double precision FMA for targets without FMA instructions. Implement double precision FMA (Fused Multiply-Add) for targets without FMA instructions using __uint128_t to store the intermediate results. Reviewed By: michaelrj, sivachandra Differential Revision: https://reviews.llvm.org/D124495 | 3 年前 | |
[libc] Implement double precision FMA for targets without FMA instructions. Implement double precision FMA (Fused Multiply-Add) for targets without FMA instructions using __uint128_t to store the intermediate results. Reviewed By: michaelrj, sivachandra Differential Revision: https://reviews.llvm.org/D124495 | 3 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][math] fmod/fmodf implementation. This is a implementation of find remainder fmod function from standard libm. The underline algorithm is developed by myself, but probably it was first invented before. Some features of the implementation: 1. The code is written on more-or-less modern C++. 2. One general implementation for both float and double precision numbers. 3. Spitted platform/architecture dependent and independent code and tests. 4. Tests covers 100% of the code for both float and double numbers. Tests cases with NaN/Inf etc is copied from glibc. 5. The new implementation in general 2-4 times faster for “regular” x,y values. It can be 20 times faster for x/y huge value, but can also be 2 times slower for double denormalized range (according to perf tests provided). 6. Two different implementation of division loop are provided. In some platforms division can be very time consuming operation. Depend on platform it can be 3-10 times slower than multiplication. Performance tests: The test is based on core-math project (https://gitlab.inria.fr/core-math/core-math). By Tue Ly suggestion I took hypot function and use it as template for fmod. Preserving all test cases. ./check.sh <--special|--worst> fmodf passed. CORE_MATH_PERF_MODE=rdtsc ./perf.sh fmodf results are GNU libc version: 2.35 GNU libc release: stable 21.166 <-- FPU 51.031 <-- current glibc 37.659 <-- this fmod version. | 3 年前 | |
[libc][math] fmod/fmodf implementation. This is a implementation of find remainder fmod function from standard libm. The underline algorithm is developed by myself, but probably it was first invented before. Some features of the implementation: 1. The code is written on more-or-less modern C++. 2. One general implementation for both float and double precision numbers. 3. Spitted platform/architecture dependent and independent code and tests. 4. Tests covers 100% of the code for both float and double numbers. Tests cases with NaN/Inf etc is copied from glibc. 5. The new implementation in general 2-4 times faster for “regular” x,y values. It can be 20 times faster for x/y huge value, but can also be 2 times slower for double denormalized range (according to perf tests provided). 6. Two different implementation of division loop are provided. In some platforms division can be very time consuming operation. Depend on platform it can be 3-10 times slower than multiplication. Performance tests: The test is based on core-math project (https://gitlab.inria.fr/core-math/core-math). By Tue Ly suggestion I took hypot function and use it as template for fmod. Preserving all test cases. ./check.sh <--special|--worst> fmodf passed. CORE_MATH_PERF_MODE=rdtsc ./perf.sh fmodf results are GNU libc version: 2.35 GNU libc release: stable 21.166 <-- FPU 51.031 <-- current glibc 37.659 <-- this fmod version. | 3 年前 | |
[libc][NFC] Remove few deprecated FPUtil header files and test patterns. Few tests have been converted to the new test patterns to facilitate this. | 4 年前 | |
[libc][NFC] Remove few deprecated FPUtil header files and test patterns. Few tests have been converted to the new test patterns to facilitate this. | 4 年前 | |
[libc][NFC] Remove few deprecated FPUtil header files and test patterns. Few tests have been converted to the new test patterns to facilitate this. | 4 年前 | |
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations. Re-apply https://reviews.llvm.org/D118173 with fix for aarch64. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D118433 | 4 年前 | |
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations. Re-apply https://reviews.llvm.org/D118173 with fix for aarch64. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D118433 | 4 年前 | |
[libc] Refactor sqrt implementations and add tests for generic sqrt implementations. Re-apply https://reviews.llvm.org/D118173 with fix for aarch64. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D118433 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] Improve hypotf performance with different algorithm correctly rounded to all rounding modes. Algorithm for hypotf: compute (a*a + b*b) in double precision, then use Dekker's algorithm to find the rounding error, and then correcting it after taking its square-root. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D118157 | 4 年前 | |
[libc] Implement correct rounding with all rounding modes for hypot functions. Update the rounding logic for generic hypot function so that it will round correctly with all rounding modes. Reviewed By: sivachandra, zimmermann6 Differential Revision: https://reviews.llvm.org/D117590 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc][NFC][Obvious] Remove few unnecessary #include directives in tests. | 5 年前 | |
[libc][NFC][Obvious] Remove few unnecessary #include directives in tests. | 5 年前 | |
[libc][NFC][Obvious] Remove few unnecessary #include directives in tests. | 5 年前 | |
[libc] Add implementations of rounding functions which depend rounding mode. Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl, llrint, llrintf and llrintl have been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D93889 | 5 年前 | |
[libc] Add implementations of rounding functions which depend rounding mode. Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl, llrint, llrintf and llrintl have been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D93889 | 5 年前 | |
[libc] Add implementations of rounding functions which depend rounding mode. Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl, llrint, llrintf and llrintl have been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D93889 | 5 年前 | |
[libc][NFC][Obvious] Remove few unnecessary #include directives in tests. | 5 年前 | |
[libc][NFC][Obvious] Remove few unnecessary #include directives in tests. | 5 年前 | |
[libc][NFC][Obvious] Remove few unnecessary #include directives in tests. | 5 年前 | |
[libc] Implement log10f correctly rounded for all rounding modes. Based on RLIBM implementation similar to logf and log2f. Most of the exceptional inputs are the exact powers of 10. Reviewed By: sivachandra, zimmermann6, santoshn, jpl169 Differential Revision: https://reviews.llvm.org/D118093 | 4 年前 | |
[libc] Implement log1pf correctly rounded to all rounding modes. Implement log1pf correctly rounded to all rounding modes relying on logf implementation for exponent > 2^(-8). Reviewed By: sivachandra, zimmermann6 Differential Revision: https://reviews.llvm.org/D118962 | 4 年前 | |
[libc] Make log2f correctly rounded for all rounding modes when FMA is not available. Add to log2f 2 more exceptional cases got when not using fma for polyeval. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D117812 | 4 年前 | |
[libc][NFC] Remove few deprecated FPUtil header files and test patterns. Few tests have been converted to the new test patterns to facilitate this. | 4 年前 | |
[libc][NFC] Remove few deprecated FPUtil header files and test patterns. Few tests have been converted to the new test patterns to facilitate this. | 4 年前 | |
[libc][NFC] Remove few deprecated FPUtil header files and test patterns. Few tests have been converted to the new test patterns to facilitate this. | 4 年前 | |
[libc] Make logf function correctly rounded for all rounding modes. Make logf function correctly rounded for all rounding modes. Reviewed By: sivachandra, zimmermann6, santoshn, jpl169 Differential Revision: https://reviews.llvm.org/D118149 | 4 年前 | |
[libc] Add implementations of rounding functions which depend rounding mode. Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl, llrint, llrintf and llrintl have been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D93889 | 5 年前 | |
[libc] Add implementations of rounding functions which depend rounding mode. Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl, llrint, llrintf and llrintl have been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D93889 | 5 年前 | |
[libc] Add implementations of rounding functions which depend rounding mode. Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl, llrint, llrintf and llrintl have been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D93889 | 5 年前 | |
[libc][NFC][Obvious] Remove few unnecessary #include directives in tests. | 5 年前 | |
[libc][NFC][Obvious] Remove few unnecessary #include directives in tests. | 5 年前 | |
[libc][NFC][Obvious] Remove few unnecessary #include directives in tests. | 5 年前 | |
[libc][NFC] Move test related pieces from FPUtil to util/UnitTest. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D112673 | 4 年前 | |
[libc][NFC] Remove few deprecated FPUtil header files and test patterns. Few tests have been converted to the new test patterns to facilitate this. | 4 年前 | |
[libc][NFC] Remove few deprecated FPUtil header files and test patterns. Few tests have been converted to the new test patterns to facilitate this. | 4 年前 | |
[libc][NFC] Remove few deprecated FPUtil header files and test patterns. Few tests have been converted to the new test patterns to facilitate this. | 4 年前 | |
[libc] Add implementations of nextafter[f|l] functions. A differential fuzzer for these functions has also been added. Along the way, a small correction has been done to the normal/subnormal limits of x86 long double values. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D94109 | 5 年前 | |
[libc] Add implementations of nextafter[f|l] functions. A differential fuzzer for these functions has also been added. Along the way, a small correction has been done to the normal/subnormal limits of x86 long double values. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D94109 | 5 年前 | |
[libc] Add implementations of nextafter[f|l] functions. A differential fuzzer for these functions has also been added. Along the way, a small correction has been done to the normal/subnormal limits of x86 long double values. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D94109 | 5 年前 | |
[libc] Fix couple of corner cases in remquo. These two cases are fixed: 1. If numerator is not zero and denominator is infinity, then the numerator is returned as the remainder. 2. If numerator and denominator are equal in magnitude, then quotient with the right sign is returned. The differet tests of remquo, remquof and remquol have been unified into a single file to avoid duplication. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D92353 | 5 年前 | |
[libc] Fix couple of corner cases in remquo. These two cases are fixed: 1. If numerator is not zero and denominator is infinity, then the numerator is returned as the remainder. 2. If numerator and denominator are equal in magnitude, then quotient with the right sign is returned. The differet tests of remquo, remquof and remquol have been unified into a single file to avoid duplication. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D92353 | 5 年前 | |
[libc] Fix couple of corner cases in remquo. These two cases are fixed: 1. If numerator is not zero and denominator is infinity, then the numerator is returned as the remainder. 2. If numerator and denominator are equal in magnitude, then quotient with the right sign is returned. The differet tests of remquo, remquof and remquol have been unified into a single file to avoid duplication. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D92353 | 5 年前 | |
[libc] Add implementations of rounding functions which depend rounding mode. Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl, llrint, llrintf and llrintl have been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D93889 | 5 年前 | |
[libc] Add implementations of rounding functions which depend rounding mode. Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl, llrint, llrintf and llrintl have been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D93889 | 5 年前 | |
[libc] Add implementations of rounding functions which depend rounding mode. Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl, llrint, llrintf and llrintl have been added. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D93889 | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc] Add testing macros for errno and floating point exceptions. Add testing macros for errno and floating point exceptions. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D121235 | 4 年前 | |
[libc] Implement sinf function that is correctly rounded to all rounding modes. Implement sinf function that is correctly rounded to all rounding modes. - We use a simple range reduction for pi/16 < |x| : Let k = round(x / pi) and y = (x/pi) - k. So k is an integer and -0.5 <= y <= 0.5. Then sin(x) = sin(y*pi + k*pi) = (-1)^(k & 1) * sin(y*pi) ~ (-1)^(k & 1) * y * P(y^2) where y*P(y^2) is a degree-15 minimax polynomial generated by Sollya with: > P = fpminimax(sin(x*pi)/x, [|0, 2, 4, 6, 8, 10, 12, 14|], [|D...|], [0, 0.5]); - Performance benchmark using perf tool from CORE-MATH project (https://gitlab.inria.fr/core-math/core-math/-/tree/master) on Ryzen 1700: Before this patch (not correctly rounded): $ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh sinf CORE-MATH reciprocal throughput : 17.892 System LIBC reciprocal throughput : 25.559 LIBC reciprocal throughput : 29.381 After this patch (correctly rounded): `` $ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh sinf CORE-MATH reciprocal throughput : 17.896 System LIBC reciprocal throughput : 25.740 LIBC reciprocal throughput : 27.872 LIBC reciprocal throughput : 20.012 (with -msse4.2 flag) LIBC reciprocal throughput : 14.244 (with -mfma flag) `` Reviewed By: zimmermann6 Differential Revision: https://reviews.llvm.org/D123154 | 3 年前 | |
[libc][NFC] Add common template test class for sqrt, sqrtf and sqrtl. | 5 年前 | |
[libc][NFC] Add common template test class for sqrt, sqrtf and sqrtl. | 5 年前 | |
[libc][NFC] Add common template test class for sqrt, sqrtf and sqrtl. | 5 年前 | |
[libc] apply formatting to tests Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127 | 4 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 | |
[libc][NFC] Add template tests for a bunch of math functions. Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round. | 5 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 |