summaryrefslogtreecommitdiff
path: root/libc/test/src/math/fabsl_test.cpp
AgeCommit message (Collapse)Author
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2021-04-16[libc][NFC] Add template tests for a bunch of math functions.Siva Chandra Reddy
Namely, template tests have been added for the following functions: ceil, copysign, fabs, fmax, fmin, floor, trunc, round.
2021-01-20[libc][NFC] add "LlvmLibc" as a prefix to all test namesMichael Jones
Summary: Having a consistent prefix makes selecting all of the llvm libc tests easier on any platform that is also using the gtest framework. This also modifies the TEST and TEST_F macros to enforce this change moving forward. Reviewers: sivachandra Subscribers:
2020-12-15[libc][NFC] Rename global `nan` in tests to `aNaN`.Siva Chandra Reddy
The name `nan` conflicts with the function `nan` defined declared in math.h.
2020-11-21[libc] Switch functions to using global headersMichael Jones
This switches all of the files in src/string, src/math, and test/src/math from using relative paths (e.g. `#include “include/string.h”`) to global paths (e.g. `#include <string.h>`) to make bringing up those functions on other platforms, such as fuchsia, easier. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D91394
2020-11-03[libc][NFC][Obvious] Use the new macro to declare special constants in tests.Siva Chandra Reddy
2020-08-20[libc][NFC] Switch math tests to the new ULP based tolerance.Siva Chandra Reddy
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D86267
2020-08-12[libc][obvious] Switch copysign[f|l] and fabs[f|l] to the new test matchers.Siva Chandra
2020-06-18[libc] Add implementations long double fabsl and truncl functions.Siva Chandra Reddy
Current implementations of single precision and double precision floating point operations operate on bits of the integer type of same size. The code made use of magic masks which were listed as literal integer values. This is not possible in the case of long double type as the mantissa of quad-precision long double type used on non-x86 architectures is wider that the widest integer type for which we can list literal values. So, in this patch, to avoid using magic masks specified with literal values, we use packed bit-field struct types and let the compiler generate the masks. This new scheme allows us to implement long double flavors of the various floating point operations. To keep the size of the patch small, only the implementations of fabs and trunc have been switched to the new scheme. In following patches, all exisiting implementations will be switched to the new scheme. Reviewers: asteinhauser Differential Revision: https://reviews.llvm.org/D82036