Change std::nan("") to proper nan constants

This commit is contained in:
tamasmeszaros 2022-05-09 13:11:01 +02:00
parent 12a54251c9
commit fed317f27b
10 changed files with 22 additions and 16 deletions

View file

@ -41,13 +41,13 @@ template<size_t N> using Bounds = std::array<Bound, N>;
class StopCriteria {
// If the absolute value difference between two scores.
double m_abs_score_diff = std::nan("");
double m_abs_score_diff = NaNd;
// If the relative value difference between two scores.
double m_rel_score_diff = std::nan("");
double m_rel_score_diff = NaNd;
// Stop if this value or better is found.
double m_stop_score = std::nan("");
double m_stop_score = NaNd;
// A predicate that if evaluates to true, the optimization should terminate
// and the best result found prior to termination should be returned.