| 3388 | }; |
| 3389 | |
| 3390 | struct WithinUlpsMatcher : MatcherBase<double> { |
| 3391 | WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType); |
| 3392 | bool match(double const& matchee) const override; |
| 3393 | std::string describe() const override; |
| 3394 | private: |
| 3395 | double m_target; |
| 3396 | uint64_t m_ulps; |
| 3397 | FloatingPointKind m_type; |
| 3398 | }; |
| 3399 | |
| 3400 | // Given IEEE-754 format for floats and doubles, we can assume |
| 3401 | // that float -> double promotion is lossless. Given this, we can |