| 7805 | } |
| 7806 | |
| 7807 | bool Approx::equalityComparisonImpl(const double other) const { |
| 7808 | // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value |
| 7809 | // Thanks to Richard Harris for his help refining the scaled margin value |
| 7810 | return marginComparison(m_value, other, m_margin) |
| 7811 | || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(std::isinf(m_value)? 0 : m_value))); |
| 7812 | } |
| 7813 | |
| 7814 | void Approx::setMargin(double newMargin) { |
| 7815 | CATCH_ENFORCE(newMargin >= 0, |
no test coverage detected