/external/llvm-project/libc/test/src/math/ |
D | HypotTest.h | 25 using FPBits = __llvm_libc::fputil::FPBits<T>; variable 26 using UIntType = typename FPBits::UIntType; 27 const T nan = __llvm_libc::fputil::FPBits<T>::buildNaN(1); 28 const T inf = __llvm_libc::fputil::FPBits<T>::inf(); 29 const T negInf = __llvm_libc::fputil::FPBits<T>::negInf(); 30 const T zero = __llvm_libc::fputil::FPBits<T>::zero(); 31 const T negZero = __llvm_libc::fputil::FPBits<T>::negZero(); 50 (FPBits::maxSubnormal - FPBits::minSubnormal) / count; in testSubnormalRange() 51 for (UIntType v = FPBits::minSubnormal, w = FPBits::maxSubnormal; in testSubnormalRange() 52 v <= FPBits::maxSubnormal && w >= FPBits::minSubnormal; in testSubnormalRange() [all …]
|
D | modfl_test.cpp | 16 using FPBits = __llvm_libc::fputil::FPBits<long double>; typedef 21 EXPECT_TRUE(FPBits::zero() == __llvm_libc::modfl(FPBits::inf(), &integral)); in TEST() 22 EXPECT_TRUE(FPBits::inf() == integral); in TEST() 24 EXPECT_TRUE(FPBits::negZero() == in TEST() 25 __llvm_libc::modfl(FPBits::negInf(), &integral)); in TEST() 26 EXPECT_TRUE(FPBits::negInf() == integral); in TEST() 28 EXPECT_TRUE(FPBits::zero() == __llvm_libc::modfl(FPBits::zero(), &integral)); in TEST() 31 EXPECT_TRUE(FPBits::negZero() == in TEST() 32 __llvm_libc::modfl(FPBits::negZero(), &integral)); in TEST() 36 FPBits(__llvm_libc::modfl(FPBits::buildNaN(1), &integral)).isNaN()); in TEST() [all …]
|
D | ILogbTest.h | 25 EXPECT_EQ(FP_ILOGB0, func(__llvm_libc::fputil::FPBits<T>::zero())); in testSpecialNumbers() 26 EXPECT_EQ(FP_ILOGB0, func(__llvm_libc::fputil::FPBits<T>::negZero())); in testSpecialNumbers() 28 EXPECT_EQ(FP_ILOGBNAN, func(__llvm_libc::fputil::FPBits<T>::buildNaN(1))); in testSpecialNumbers() 30 EXPECT_EQ(INT_MAX, func(__llvm_libc::fputil::FPBits<T>::inf())); in testSpecialNumbers() 31 EXPECT_EQ(INT_MAX, func(__llvm_libc::fputil::FPBits<T>::negInf())); in testSpecialNumbers() 74 using FPBits = __llvm_libc::fputil::FPBits<T>; in testSubnormalRange() local 75 using UIntType = typename FPBits::UIntType; in testSubnormalRange() 78 (FPBits::maxSubnormal - FPBits::minSubnormal) / count; in testSubnormalRange() 79 for (UIntType v = FPBits::minSubnormal; v <= FPBits::maxSubnormal; in testSubnormalRange() 81 T x = FPBits(v); in testSubnormalRange() [all …]
|
D | RemQuoTest.h | 23 using FPBits = __llvm_libc::fputil::FPBits<T>; variable 24 using UIntType = typename FPBits::UIntType; 26 const T zero = __llvm_libc::fputil::FPBits<T>::zero(); 27 const T negZero = __llvm_libc::fputil::FPBits<T>::negZero(); 28 const T inf = __llvm_libc::fputil::FPBits<T>::inf(); 29 const T negInf = __llvm_libc::fputil::FPBits<T>::negInf(); 30 const T nan = __llvm_libc::fputil::FPBits<T>::buildNaN(1); 100 (FPBits::maxSubnormal - FPBits::minSubnormal) / count; in testSubnormalRange() 101 for (UIntType v = FPBits::minSubnormal, w = FPBits::maxSubnormal; in testSubnormalRange() 102 v <= FPBits::maxSubnormal && w >= FPBits::minSubnormal; in testSubnormalRange() [all …]
|
D | LdExpTest.h | 23 using FPBits = __llvm_libc::fputil::FPBits<T>; variable 25 using UIntType = typename FPBits::UIntType; 31 const T zero = __llvm_libc::fputil::FPBits<T>::zero(); 32 const T negZero = __llvm_libc::fputil::FPBits<T>::negZero(); 33 const T inf = __llvm_libc::fputil::FPBits<T>::inf(); 34 const T negInf = __llvm_libc::fputil::FPBits<T>::negInf(); 35 const T nan = __llvm_libc::fputil::FPBits<T>::buildNaN(1); 63 NormalFloat x(FPBits::maxExponent - 10, NormalFloat::one + 0xF00BA, 0); in testOverflow() 73 int32_t baseExponent = FPBits::exponentBias + mantissaWidth; in testUnderflowToZeroOnNormal() 85 int32_t baseExponent = FPBits::exponentBias + mantissaWidth; in testUnderflowToZeroOnSubnormal() [all …]
|
D | logbl_test.cpp | 15 using FPBits = __llvm_libc::fputil::FPBits<long double>; typedef 18 EXPECT_TRUE(FPBits::inf() == __llvm_libc::logbl(FPBits::inf())); in TEST() 19 EXPECT_TRUE(FPBits::inf() == __llvm_libc::logbl(FPBits::negInf())); in TEST() 21 EXPECT_TRUE(FPBits::negInf() == __llvm_libc::logbl(FPBits::zero())); in TEST() 22 EXPECT_TRUE(FPBits::negInf() == __llvm_libc::logbl(FPBits::negZero())); in TEST() 24 EXPECT_TRUE(FPBits(__llvm_libc::logbl(FPBits::buildNaN(1))).isNaN()); in TEST() 65 using UIntType = FPBits::UIntType; in TEST() 69 long double x = FPBits(v); in TEST()
|
D | frexpl_test.cpp | 16 using FPBits = __llvm_libc::fputil::FPBits<long double>; typedef 23 EXPECT_TRUE(FPBits::inf() == __llvm_libc::frexpl(FPBits::inf(), &exponent)); in TEST() 24 EXPECT_TRUE(FPBits::negInf() == in TEST() 25 __llvm_libc::frexpl(FPBits::negInf(), &exponent)); in TEST() 27 EXPECT_TRUE(FPBits::zero() == __llvm_libc::frexpl(FPBits::zero(), &exponent)); in TEST() 30 EXPECT_TRUE(FPBits::negZero() == in TEST() 31 __llvm_libc::frexpl(FPBits::negZero(), &exponent)); in TEST() 35 FPBits(__llvm_libc::frexpl(FPBits::buildNaN(1), &exponent)).isNaN()); in TEST() 92 using UIntType = FPBits::UIntType; in TEST() 96 long double x = FPBits(v); in TEST()
|
D | FDimTest.h | 19 using FPBits = __llvm_libc::fputil::FPBits<T>; variable 20 using UIntType = typename FPBits::UIntType; 60 T x = FPBits(v), y = FPBits(w); in testInRange() 77 const T nan = __llvm_libc::fputil::FPBits<T>::buildNaN(1); 78 const T inf = __llvm_libc::fputil::FPBits<T>::inf(); 79 const T negInf = __llvm_libc::fputil::FPBits<T>::negInf(); 80 const T zero = __llvm_libc::fputil::FPBits<T>::zero(); 81 const T negZero = __llvm_libc::fputil::FPBits<T>::negZero();
|
D | fabs_test.cpp | 16 using FPBits = __llvm_libc::fputil::FPBits<double>; typedef 33 using UIntType = FPBits::UIntType; in TEST() 37 double x = FPBits(v); in TEST()
|
D | fabsf_test.cpp | 16 using FPBits = __llvm_libc::fputil::FPBits<float>; typedef 33 using UIntType = FPBits::UIntType; in TEST() 37 float x = FPBits(v); in TEST()
|
D | fabsl_test.cpp | 16 using FPBits = __llvm_libc::fputil::FPBits<long double>; typedef 33 using UIntType = FPBits::UIntType; in TEST() 37 long double x = FPBits(v); in TEST()
|
D | fminl_test.cpp | 15 using FPBits = __llvm_libc::fputil::FPBits<long double>; typedef 53 using UIntType = FPBits::UIntType; in TEST() 58 long double x = FPBits(v), y = FPBits(w); in TEST()
|
D | fmaxf_test.cpp | 15 using FPBits = __llvm_libc::fputil::FPBits<float>; typedef 53 using UIntType = FPBits::UIntType; in TEST() 58 float x = FPBits(v), y = FPBits(w); in TEST()
|
D | fminf_test.cpp | 15 using FPBits = __llvm_libc::fputil::FPBits<float>; typedef 53 using UIntType = FPBits::UIntType; in TEST() 58 float x = FPBits(v), y = FPBits(w); in TEST()
|
D | fmin_test.cpp | 15 using FPBits = __llvm_libc::fputil::FPBits<double>; typedef 53 using UIntType = FPBits::UIntType; in TEST() 58 double x = FPBits(v), y = FPBits(w); in TEST()
|
D | fmaxl_test.cpp | 15 using FPBits = __llvm_libc::fputil::FPBits<long double>; typedef 53 using UIntType = FPBits::UIntType; in TEST() 58 long double x = FPBits(v), y = FPBits(w); in TEST()
|
D | fmax_test.cpp | 15 using FPBits = __llvm_libc::fputil::FPBits<double>; typedef 53 using UIntType = FPBits::UIntType; in TEST() 58 double x = FPBits(v), y = FPBits(w); in TEST()
|
/external/llvm-project/libc/utils/FPUtil/ |
D | ManipulationFunctions.h | 27 FPBits<T> bits(x); in frexp() 44 FPBits<T> bits(x); in modf() 50 return bits.sign ? FPBits<T>::negZero() : FPBits<T>::zero(); in modf() 56 return bits.sign ? FPBits<T>::negZero() : FPBits<T>::zero(); in modf() 66 FPBits<T> xbits(x); in copysign() 67 xbits.sign = FPBits<T>(y).sign; in copysign() 76 FPBits<T> bits(x); in ilogb() 103 FPBits<T> bits(x); in logb() 107 return FPBits<T>::negInf(); in logb() 112 return FPBits<T>::inf(); in logb() [all …]
|
D | LongDoubleBitsX86.h | 31 template <> struct __attribute__((packed)) FPBits<long double> { 54 explicit FPBits<long double>(XType x) { 55 *this = *reinterpret_cast<FPBits<long double> *>(&x); 91 explicit FPBits<long double>(XType x) { 93 *this = *reinterpret_cast<FPBits<long double> *>(&x); 102 *reinterpret_cast<FPBits<long double> *>(&result) = *this; 114 static FPBits<long double> zero() { return FPBits<long double>(0.0l); } 116 static FPBits<long double> negZero() { 117 FPBits<long double> bits(0.0l); 122 static FPBits<long double> inf() { [all …]
|
D | FPBits.h | 60 template <typename T> struct __attribute__((packed)) FPBits { 88 explicit FPBits(XType x) { 89 *this = *reinterpret_cast<FPBits<T> *>(&x); 111 explicit FPBits<long double>(XType x) { 113 *this = *reinterpret_cast<FPBits<T> *>(&x); 120 static FPBits<T> zero() { return FPBits(T(0.0)); } 122 static FPBits<T> negZero() { 123 FPBits<T> bits(T(0.0)); 128 static FPBits<T> inf() { 129 FPBits<T> bits(T(0.0)); [all …]
|
D | NormalFloat.h | 33 using UIntType = typename FPBits<T>::UIntType; 57 explicit NormalFloat(T x) { initFromBits(FPBits<T>(x)); } in NormalFloat() 59 explicit NormalFloat(FPBits<T> bits) { initFromBits(bits); } in NormalFloat() 92 int biasedExponent = exponent + FPBits<T>::exponentBias; in T() 96 return sign ? FPBits<T>::negInf() : FPBits<T>::inf(); in T() 99 FPBits<T> result(T(0.0)); in T() 102 constexpr int subnormalExponent = -FPBits<T>::exponentBias + 1; in T() 135 result.exponent = exponent + FPBits<T>::exponentBias; in T() 141 void initFromBits(FPBits<T> bits) { in initFromBits() 156 exponent = 1 - FPBits<T>::exponentBias - shift; in initFromBits() [all …]
|
D | SqrtLongDoubleX86.h | 47 using UIntType = typename FPBits<long double>::UIntType; 51 FPBits<long double> bits(x); 56 return FPBits<long double>::buildNaN(One >> 1); 68 return FPBits<long double>::buildNaN(One >> 1); 121 xExp = ((xExp >> 1) + FPBits<long double>::exponentBias); 131 FPBits<long double> out(0.0L);
|
D | TestHelpers.h | 41 fputil::FPBits<T> actualBits(actual), expectedBits(expected); in match() 69 static const T zero = __llvm_libc::fputil::FPBits<T>::zero(); \ 70 static const T negZero = __llvm_libc::fputil::FPBits<T>::negZero(); \ 71 static const T nan = __llvm_libc::fputil::FPBits<T>::buildNaN(1); \ 72 static const T inf = __llvm_libc::fputil::FPBits<T>::inf(); \ 73 static const T negInf = __llvm_libc::fputil::FPBits<T>::negInf();
|
D | Sqrt.h | 23 typename FPBits<T>::UIntType &mantissa); 93 using UIntType = typename FPBits<T>::UIntType; in sqrt() 96 FPBits<T> bits(x); in sqrt() 101 return FPBits<T>::buildNaN(One >> 1); in sqrt() 113 return FPBits<T>::buildNaN(One >> 1); in sqrt() 167 xExp = ((xExp >> 1) + FPBits<T>::exponentBias); in sqrt()
|
/external/llvm-project/libc/utils/MPFRWrapper/ |
D | MPFRUtils.cpp | 32 template <typename T> using FPBits = __llvm_libc::fputil::FPBits<T>; typedef 211 fputil::FPBits<T> bits(input); in ulp() 219 int epsExponent = bits.exponent - fputil::FPBits<T>::exponentBias - in ulp() 315 FPBits<T> inputBits(input); in explainUnaryOperationSingleOutputError() 316 FPBits<T> matchBits(matchValue); in explainUnaryOperationSingleOutputError() 317 FPBits<T> mpfrResultBits(mpfrResult.as<T>()); in explainUnaryOperationSingleOutputError() 346 FPBits<T> inputBits(input); in explainUnaryOperationTwoOutputsError() 393 FPBits<T> xbits(input.x); in explainBinaryOperationTwoOutputsError() 394 FPBits<T> ybits(input.y); in explainBinaryOperationTwoOutputsError() 429 FPBits<T> xbits(input.x); in explainBinaryOperationOneOutputError() [all …]
|