3 ms·
Continued fractions show up in odd random places, generally when you need to represent a value as precisely as possible with a ratio of two integers that are, t
by CamperBob2 12y ago
Continued fractions show up in odd random places, generally when you need to represent a value as precisely as possible with a ratio of two integers that are, themselves, as small as possible.
I was writing code to program an RF synthesizer chip the other day and found myself going back to an old Graphics Gems chapter by Ken Shoemake, after discarding three or four newer implementations of rational approximation solvers that I wasn't happy with for various reasons. Ken's application was for intersection testing (presumably for polygon clipping) on machines with limited precision. It's a great introduction to the topic if you can find it.