News for hackers. Stuff that matters.
Re:C++20 Concepts: The Definitive Guide by ncmncm on Monday August 23, 2021 @01:44AM (#28272658)
If you keep infinities and NaNs out of a subsystem, then float and double are totally ordered within that subsystem. So, it is a choice. I would not hesitate on that basis.

Of more moment is that floating point variables often represent imprecise values, such that e.g. 1.41 could represent a value that should equal another transcribed as 1.39. The type system will not help you there. You are obliged to code in tolerance the hard way.

There are no comments on this comment yet.