\\% Round matrix entries if close to an integer. \\ Author: Joerg Arndt \\ License: GPL version 3 or later \\ online at http://www.jjj.de/pari/ \\ version: 2011-January-19 (12:50) matchop(m, eps=1e-15)= { /* matrix enries closer than eps to the next integer are round()-ed */ local(nr, nc, v); nr = matsize(m)[1]; nc = matsize(m)[2]; for (r=1, nr, for (c=1, nc, rnd = round(m[r,c]); if ( abs(m[r,c]-rnd)