Lines Matching full:bt
170 template <typename BT> double GetULPDiffBits(BT v1_bits, BT v2_bits) {
183 using BT = typename FTInfo<FT>::orig_bits_type;
184 static_assert(sizeof(FT) == sizeof(BT), "not implemented");
185 static_assert(sizeof(BT) <= 64, "not implemented");
186 BT v1_bits;
187 __builtin_memcpy(&v1_bits, &v1, sizeof(BT));
188 BT v2_bits;
189 __builtin_memcpy(&v2_bits, &v2, sizeof(BT));
193 constexpr BT kSignMask = BT{1} << (CHAR_BIT * sizeof(BT) - 1);
198 return GetULPDiffBits<BT>(v1_bits, kSignMask) +
199 GetULPDiffBits<BT>(0, v2_bits);
201 return GetULPDiffBits<BT>(v2_bits, kSignMask) +
202 GetULPDiffBits<BT>(0, v1_bits);
212 using BT = __uint128_t;
213 BT v1_bits = 0;
215 BT v2_bits = 0;
217 if ((v1_bits ^ v2_bits) & (BT{1} << (CHAR_BIT * sizeof(BT) - 1)))
222 BT diff = v1_bits >= v2_bits ? v1_bits - v2_bits : v2_bits - v1_bits;