need to round a result number,by precision;

Example:
Math : y=x/1000000; x=5 => y=0.000005,
but if I do this in java script y=0.00000500001;(not right) ;how do I round a equation by precision to have a math result