changed max double precision to 31