This is a pre-copyedited, author-produced PDF of an article accepted for publication in ACM Trans. Math. Softw. following peer review.This is a pre-copyedited, author-produced PDF of an article accepted for publication in ACM Transactions on Mathematical Software following peer review. The version of record is available http://dl.acm.org/citation.cfm?id=3015464