Finding fraction.

Правка en3, от Logarithmic, 2017-02-05 19:23:48

Given a range (l, r) where 0.0 <= l,r <= 1.0 we want to find a fraction x/y which satisfies following condition: l <= x/y < r and y should be as small as possible. l and r might have at most 9 digits after floating point.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Logarithmic 2017-02-05 19:23:48 36
en2 Английский Logarithmic 2017-02-04 19:51:28 37 Tiny change: '<= x/y < r. l and r ' -> '<= x/y < r and y should be as small as possible. l and r '
en1 Английский Logarithmic 2017-02-04 19:08:41 236 Initial revision (published)