What is a good way to round double-precision values to a (somewhat) lower precision?
问题 My problem is that I have to use a thrid-party function/algorithm which takes an array of double -precision values as input, but apparently can be sensitive to very small changes in the input data. However for my application I have to get identical results for inputs that are (almost) identical! In particular I have two test input arrays which are identical up to the 5-th position after the decimal point and still I get different results. So what causes the "problem" must be after the 5-th