Is there any way to get the next integer multiple of a given float number? An if so, how is it called? Let's say, if you have $1.5$, the next one will be $3 \,(= 1.5 \cdot 2 )$ , but when it's not that easy to guess, it can take some time without any formula.
Asked
Active
Viewed 105 times
0
-
1Sounds like you're just referring to the numerator of a given rational number? If so then you will want to specify a tolerance for whether $1.49999$ should be treated the same as $1.5$. Then look up "continued fractions". – Erick Wong Mar 14 '13 at 23:16
-
If you're working with exact fractions, this is the numerator in the reduced fraction. – yatima2975 Mar 14 '13 at 23:21