Floating point is a real trip. They should probably spend more time going over its intricacies in programming courses, because its not going anywhere.
E.g. you should hardly ever test floating point numbers for equality. Instead you usually check if they are "close enough" within an expected precision.
E.g. you should hardly ever test floating point numbers for equality. Instead you usually check if they are "close enough" within an expected precision.