Oh that was quick, the title should have read ... rationals and integers ... thanks Ted for changing the title. Hand tuning the files is out of question, nevertheless I've written a small filter in Perl to add the necessary maxima code as suggested by Richard. Thanks