Increment decimal, floating point numbers
问题 Can anyone explain the best logic / method for incrementing floating, decimal numbers ? For example, if we assume starting decimal number is 2.0, so the next items should automatically get number accordingly say, 2.01, 2.02, 2.03, ....., 2.09, 2.10, 2.11.. etc. But what is the starting number is 2.1, so what would be the next sequence : Is it ? 2.11, 2.12, 2.13, 2.14, ..... 2.19, 2.20 etc...? I is logically correct? I am confused. Please help. 回答1: It depends entirely on what the application