The trick of converting an optimization problem to a decision problem is well-known - you add a real number input to the decision problem for thresholding.
For example, this is taken from Wikipedia about the traveling salesman problem:
"The problem has been shown to be NP-hard (more precisely, it is complete for the complexity class FPNP; see function problem), and the decision problem version ("given the costs and a number x, decide whether there is a round-trip route cheaper than x") is NP-complete."
However, it is not clear to me how we actually tackle numerical issues with this kind of thresholding. For example, how can we assure, given our finite accuracy in the algorithm, that we are not away from x slightly? More specifically, if we set x=1.0, and we managed to show using our finite accuracy that it holds for 0.9999.., how can we tell it is not actually holding for x=1.0? (0.99999... is a representation of 1 as well.)
This problem does not happen when x is an integer value.
I would appreciate any response. Of course, there are many algorithms that assume that we have "access" to a Turing machine that can compute any real number... But I find this case especially important to distinguish from the other cases, because it could affect the complexity of the algorithm, and our whole point is to show hardness of some sort. So, I don't think we can just avoid this issue by just making the assumption that we have such a powerful Turing machine.