Decimals to Fractions Conversion Algorithm, how does it work?
问题 I'm working on a harmonic ratio program and part of what I want a user to be able to do is plug in various ratios and have the decimal-valued frequency that's playing show you more ratio-locked frequencies that are higher or lower. Anyway, on this webpage there is a javascript algorithm to show fractional values (ratios) from given decimals. http://www.mindspring.com/~alanh/fracs.html How does it work? I am interested in implementing it myself, but I don't really understand how it functions.