It is interesting that you are using the same formulas regardless of the
precision; I would have thought that the coefficients would have to be
scaled for each precision to avoid overflow.
In any case, I don't think you'll be able to get very far using the exact
formulae involving rounding, since very few algebraic operations
(simplifications) are possible. Just as in floating-point, you should
probably work with an error term for each operation; of course with
fixed-point, it is an absolute, not a relative, error.