| 100 | |
| 101 | template <typename NativeT, typename UnsignedT> |
| 102 | Status MakeBitwiseErrorStatus(NativeT lhs, NativeT rhs, |
| 103 | absl::Span<const int64> multi_index) { |
| 104 | auto ulhs = absl::bit_cast<UnsignedT>(GetRawValue(lhs)); |
| 105 | auto urhs = absl::bit_cast<UnsignedT>(GetRawValue(rhs)); |
| 106 | auto lhs_double = static_cast<double>(lhs); |
| 107 | auto rhs_double = static_cast<double>(rhs); |
| 108 | return InvalidArgument( |
| 109 | "floating values are not bitwise-equal; and equality testing " |
| 110 | "was requested: %s=%s=%a vs %s=%s=%a at array index %s", |
| 111 | StrCat(absl::Hex(ulhs)), RoundTripFpToString(lhs), lhs_double, |
| 112 | StrCat(absl::Hex(urhs)), RoundTripFpToString(rhs), rhs_double, |
| 113 | LiteralUtil::MultiIndexAsString(multi_index)); |
| 114 | } |
| 115 | |
| 116 | template <typename NativeT> |
| 117 | Status MakeErrorStatus(NativeT lhs, NativeT rhs, |
nothing calls this directly
no test coverage detected