0

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.

DonAntonio
  • 211,718
  • 17
  • 136
  • 287
Dane411
  • 115
  • 1
    Sounds 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

0 Answers0