Include a formula's revision in its version number

Absent any helper methods, I think this is about right - if you want to split this out into something that's easier to read, I can think of a few refactorings that would probably help (: