Comment on What every computer scientist should know about floating-point arithmetic (1991) [pdf]parentComments−fransje265moI would argue that double m_D{}; [...] if (m_D == 0) somethingNeedsInstantiation(); can avoid having to carry around, set and check some extra m_HasValueBeenSet booleans.Of course, it might not be something you want to overload beginner programmers with.
Comments
I would argue that
can avoid having to carry around, set and check some extra m_HasValueBeenSet booleans.Of course, it might not be something you want to overload beginner programmers with.