fixed float constants to be read as doubles
added clamp in double precision