I write below code in java
double scale=1.0; for(int i=0;i<6;i++){ scale=scale/10; } System.out.println(scale);
Now out put of this is
1.0000000000000002E-6
which seems to be incorrect, but if I loop 5 times then output is correct as below
1.0E-5
Can any body tell me why this is and how can I remove this.