Well, what it does is find the closest match to a particular ratio in any equal temperament tuning. For example, to find the closest match to an octave in the Bohlen-Pierce 13 tone equal temperament, you would enter an interval of 3, divisions of 13, and a target of 2, then hit run. After a couple of seconds it will return the closest match (1.96613) and a variance value (0.033866). This type of tool would be useful in analyzing new equal temperament tunings, and is inspired by the work described by Wendy Carlos in development of the Alpha, Beta, and Gamma tunings.
I used [pulse] as a way to get it to run through the operations the appropriate number of times for the tuning (ie 13 times maximum for BP13TET), and [counter] to help keep track of finding the closest match below and above the target ratio. It is probably more convoluted than it needs to be; keep in mind this is my first pd patch.
I don't doubt that a simpler and cleaner solution could be found and would be certainly be interested to see any improvements more experienced pd users can come up with. Expansion to deal with multiple target ratios would obviously be useful.