Added double precision version