Why can’t decimal numbers be represented exactly in binary?

There have been several questions posted to SO about floating-point representation. For example, the decimal number 0.1 doesn’t have an exact binary representation, so it’s dangerous to use the == operator to compare it to another floating-point number. I understand the principles behind floating-point representation. What I don’t understand is why, from a mathematical perspective, … Read more

How to determine if a point is in a 2D triangle? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 1 year ago. The community reviewed whether to reopen this question 6 months ago and left it closed: Original close reason(s) were not resolved Improve … Read more