swr: add double precision support to the rematrix code