Converting a floating-point number to a fraction (approximately) using continued fraction expansion

from blog Kevin Boone's website, | ↗ original
A detailed description of a method for performing this common numerical conversion, with C source code.