updated single/double precision handling