/external/llvm-project/libc/test/src/math/ |
D | modff_test.cpp | 21 using BitPatterns = __llvm_libc::fputil::BitPatterns<float>; typedef 27 EXPECT_EQ(BitPatterns::aQuietNaN, in TEST() 29 valueFromBits(BitPatterns::aQuietNaN), &integral))); in TEST() 30 EXPECT_EQ(BitPatterns::aNegativeQuietNaN, in TEST() 32 valueFromBits(BitPatterns::aNegativeQuietNaN), &integral))); in TEST() 34 EXPECT_EQ(BitPatterns::aSignallingNaN, in TEST() 36 valueFromBits(BitPatterns::aSignallingNaN), &integral))); in TEST() 38 BitPatterns::aNegativeSignallingNaN, in TEST() 40 valueFromBits(BitPatterns::aNegativeSignallingNaN), &integral))); in TEST() 42 EXPECT_EQ(BitPatterns::zero, in TEST() [all …]
|
D | modf_test.cpp | 21 using BitPatterns = __llvm_libc::fputil::BitPatterns<double>; typedef 27 EXPECT_EQ(BitPatterns::aQuietNaN, in TEST() 28 valueAsBits(__llvm_libc::modf(valueFromBits(BitPatterns::aQuietNaN), in TEST() 30 EXPECT_EQ(BitPatterns::aNegativeQuietNaN, in TEST() 32 valueFromBits(BitPatterns::aNegativeQuietNaN), &integral))); in TEST() 34 EXPECT_EQ(BitPatterns::aSignallingNaN, in TEST() 36 valueFromBits(BitPatterns::aSignallingNaN), &integral))); in TEST() 38 BitPatterns::aNegativeSignallingNaN, in TEST() 40 valueFromBits(BitPatterns::aNegativeSignallingNaN), &integral))); in TEST() 42 EXPECT_EQ(BitPatterns::zero, in TEST() [all …]
|
D | expf_test.cpp | 27 using BitPatterns = __llvm_libc::fputil::BitPatterns<float>; typedef 35 isQuietNaN(__llvm_libc::expf(valueFromBits(BitPatterns::aQuietNaN)))); in TEST() 39 __llvm_libc::expf(valueFromBits(BitPatterns::aNegativeQuietNaN)))); in TEST() 43 __llvm_libc::expf(valueFromBits(BitPatterns::aSignallingNaN)))); in TEST() 47 __llvm_libc::expf(valueFromBits(BitPatterns::aNegativeSignallingNaN)))); in TEST() 50 EXPECT_EQ(BitPatterns::inf, in TEST() 51 valueAsBits(__llvm_libc::expf(valueFromBits(BitPatterns::inf)))); in TEST() 54 EXPECT_EQ(BitPatterns::zero, in TEST() 55 valueAsBits(__llvm_libc::expf(valueFromBits(BitPatterns::negInf)))); in TEST() 58 EXPECT_EQ(BitPatterns::one, in TEST() [all …]
|
D | logb_test.cpp | 20 using BitPatterns = __llvm_libc::fputil::BitPatterns<double>; typedef 25 BitPatterns::aQuietNaN, in TEST() 26 valueAsBits(__llvm_libc::logb(valueFromBits(BitPatterns::aQuietNaN)))); in TEST() 27 EXPECT_EQ(BitPatterns::aNegativeQuietNaN, in TEST() 29 valueFromBits(BitPatterns::aNegativeQuietNaN)))); in TEST() 31 EXPECT_EQ(BitPatterns::aSignallingNaN, in TEST() 33 __llvm_libc::logb(valueFromBits(BitPatterns::aSignallingNaN)))); in TEST() 34 EXPECT_EQ(BitPatterns::aNegativeSignallingNaN, in TEST() 36 valueFromBits(BitPatterns::aNegativeSignallingNaN)))); in TEST() 38 EXPECT_EQ(BitPatterns::inf, in TEST() [all …]
|
D | logbf_test.cpp | 20 using BitPatterns = __llvm_libc::fputil::BitPatterns<float>; typedef 25 BitPatterns::aQuietNaN, in TEST() 26 valueAsBits(__llvm_libc::logbf(valueFromBits(BitPatterns::aQuietNaN)))); in TEST() 27 EXPECT_EQ(BitPatterns::aNegativeQuietNaN, in TEST() 29 valueFromBits(BitPatterns::aNegativeQuietNaN)))); in TEST() 31 EXPECT_EQ(BitPatterns::aSignallingNaN, in TEST() 33 valueFromBits(BitPatterns::aSignallingNaN)))); in TEST() 34 EXPECT_EQ(BitPatterns::aNegativeSignallingNaN, in TEST() 36 valueFromBits(BitPatterns::aNegativeSignallingNaN)))); in TEST() 38 EXPECT_EQ(BitPatterns::inf, in TEST() [all …]
|
D | exp2f_test.cpp | 27 using BitPatterns = __llvm_libc::fputil::BitPatterns<float>; typedef 35 isQuietNaN(__llvm_libc::exp2f(valueFromBits(BitPatterns::aQuietNaN)))); in TEST() 39 __llvm_libc::exp2f(valueFromBits(BitPatterns::aNegativeQuietNaN)))); in TEST() 43 __llvm_libc::exp2f(valueFromBits(BitPatterns::aSignallingNaN)))); in TEST() 47 __llvm_libc::exp2f(valueFromBits(BitPatterns::aNegativeSignallingNaN)))); in TEST() 50 EXPECT_EQ(BitPatterns::inf, in TEST() 51 valueAsBits(__llvm_libc::exp2f(valueFromBits(BitPatterns::inf)))); in TEST() 54 EXPECT_EQ(BitPatterns::zero, valueAsBits(__llvm_libc::exp2f( in TEST() 55 valueFromBits(BitPatterns::negInf)))); in TEST() 58 EXPECT_EQ(BitPatterns::one, in TEST() [all …]
|
D | cosf_test.cpp | 29 using BitPatterns = __llvm_libc::fputil::BitPatterns<float>; typedef 39 isQuietNaN(__llvm_libc::cosf(valueFromBits(BitPatterns::aQuietNaN)))); in TEST() 43 __llvm_libc::cosf(valueFromBits(BitPatterns::aNegativeQuietNaN)))); in TEST() 47 __llvm_libc::cosf(valueFromBits(BitPatterns::aSignallingNaN)))); in TEST() 51 __llvm_libc::cosf(valueFromBits(BitPatterns::aNegativeSignallingNaN)))); in TEST() 54 EXPECT_EQ(BitPatterns::one, in TEST() 55 valueAsBits(__llvm_libc::cosf(valueFromBits(BitPatterns::zero)))); in TEST() 58 EXPECT_EQ(BitPatterns::one, valueAsBits(__llvm_libc::cosf( in TEST() 59 valueFromBits(BitPatterns::negZero)))); in TEST() 63 EXPECT_TRUE(isQuietNaN(__llvm_libc::cosf(valueFromBits(BitPatterns::inf)))); in TEST() [all …]
|
D | frexp_test.cpp | 26 using BitPatterns = __llvm_libc::fputil::BitPatterns<double>; typedef 32 EXPECT_EQ(BitPatterns::aQuietNaN, in TEST() 34 valueFromBits(BitPatterns::aQuietNaN), &exponent))); in TEST() 35 EXPECT_EQ(BitPatterns::aNegativeQuietNaN, in TEST() 37 valueFromBits(BitPatterns::aNegativeQuietNaN), &exponent))); in TEST() 39 EXPECT_EQ(BitPatterns::aSignallingNaN, in TEST() 41 valueFromBits(BitPatterns::aSignallingNaN), &exponent))); in TEST() 43 BitPatterns::aNegativeSignallingNaN, in TEST() 45 valueFromBits(BitPatterns::aNegativeSignallingNaN), &exponent))); in TEST() 47 EXPECT_EQ(BitPatterns::inf, valueAsBits(__llvm_libc::frexp( in TEST() [all …]
|
D | frexpf_test.cpp | 26 using BitPatterns = __llvm_libc::fputil::BitPatterns<float>; typedef 32 EXPECT_EQ(BitPatterns::aQuietNaN, in TEST() 34 valueFromBits(BitPatterns::aQuietNaN), &exponent))); in TEST() 35 EXPECT_EQ(BitPatterns::aNegativeQuietNaN, in TEST() 37 valueFromBits(BitPatterns::aNegativeQuietNaN), &exponent))); in TEST() 39 EXPECT_EQ(BitPatterns::aSignallingNaN, in TEST() 41 valueFromBits(BitPatterns::aSignallingNaN), &exponent))); in TEST() 43 BitPatterns::aNegativeSignallingNaN, in TEST() 45 valueFromBits(BitPatterns::aNegativeSignallingNaN), &exponent))); in TEST() 47 EXPECT_EQ(BitPatterns::inf, valueAsBits(__llvm_libc::frexpf( in TEST() [all …]
|
D | sincosf_test.cpp | 29 using BitPatterns = __llvm_libc::fputil::BitPatterns<float>; typedef 39 __llvm_libc::sincosf(valueFromBits(BitPatterns::aQuietNaN), &sin, &cos); in TEST() 44 __llvm_libc::sincosf(valueFromBits(BitPatterns::aNegativeQuietNaN), &sin, in TEST() 50 __llvm_libc::sincosf(valueFromBits(BitPatterns::aSignallingNaN), &sin, &cos); in TEST() 55 __llvm_libc::sincosf(valueFromBits(BitPatterns::aNegativeSignallingNaN), &sin, in TEST() 61 __llvm_libc::sincosf(valueFromBits(BitPatterns::zero), &sin, &cos); in TEST() 62 EXPECT_EQ(BitPatterns::one, valueAsBits(cos)); in TEST() 63 EXPECT_EQ(BitPatterns::zero, valueAsBits(sin)); in TEST() 66 __llvm_libc::sincosf(valueFromBits(BitPatterns::negZero), &sin, &cos); in TEST() 67 EXPECT_EQ(BitPatterns::one, valueAsBits(cos)); in TEST() [all …]
|
D | sinf_test.cpp | 29 using BitPatterns = __llvm_libc::fputil::BitPatterns<float>; typedef 39 isQuietNaN(__llvm_libc::sinf(valueFromBits(BitPatterns::aQuietNaN)))); in TEST() 43 __llvm_libc::sinf(valueFromBits(BitPatterns::aNegativeQuietNaN)))); in TEST() 47 __llvm_libc::sinf(valueFromBits(BitPatterns::aSignallingNaN)))); in TEST() 51 __llvm_libc::sinf(valueFromBits(BitPatterns::aNegativeSignallingNaN)))); in TEST() 54 EXPECT_EQ(BitPatterns::zero, in TEST() 55 valueAsBits(__llvm_libc::sinf(valueFromBits(BitPatterns::zero)))); in TEST() 58 EXPECT_EQ(BitPatterns::negZero, valueAsBits(__llvm_libc::sinf( in TEST() 59 valueFromBits(BitPatterns::negZero)))); in TEST() 63 EXPECT_TRUE(isQuietNaN(__llvm_libc::sinf(valueFromBits(BitPatterns::inf)))); in TEST() [all …]
|
D | sdcomp26094.h | 18 static constexpr __llvm_libc::cpp::Array<fputil::BitPatterns<float>::BitsType,
|
/external/llvm-project/libc/utils/FPUtil/ |
D | ClassificationFunctions.h | 23 return ((bits & BitPatterns<FPType>::inf) == BitPatterns<FPType>::inf) && in bitsAreInf() 36 return ((bits & BitPatterns<FPType>::inf) == BitPatterns<FPType>::inf) && in bitsAreNaN() 49 return (bits & BitPatterns<FPType>::inf) == BitPatterns<FPType>::inf; in bitsAreInfOrNaN() 54 return (bits == BitPatterns<FPType>::zero) || in bitsAreZero() 55 (bits == BitPatterns<FPType>::negZero); in bitsAreZero() 72 return ((bits & BitPatterns<T>::inf) == BitPatterns<T>::inf) && in isQuietNaN() 83 return ((bits & BitPatterns<T>::negInf) == BitPatterns<T>::negInf) && in isNegativeQuietNaN()
|
D | BitPatterns.h | 23 template <typename T> struct BitPatterns {}; struct 25 template <> struct BitPatterns<float> { 45 template <> struct BitPatterns<double> {
|
D | CMakeLists.txt | 19 BitPatterns.h
|
/external/llvm-project/llvm/include/llvm/ADT/ |
D | Bitfields.h | 94 template <typename T, unsigned Bits> struct BitPatterns { struct 123 using BP = BitPatterns<T, Bits>; argument 136 using BP = BitPatterns<T, Bits>; 161 using BP = BitPatterns<StorageType, Bitfield::Bits>;
|