As pointed already out, `Math.round()`

works as standard round, therefore always get you rid of any decimal places and returns the whole number.

If you need round to specific number of decimal places, this is what you need

```
import java.math.BigDecimal;
import java.math.RoundingMode;
public class RoundingExample {
public static void main(String[] args) {
double tmp = 6.079084800080882E-5;
System.out.println(round(tmp, 3));
System.out.println(round(tmp, 4));
System.out.println(round(tmp, 5));
System.out.println(round(tmp, 6));
System.out.println(round(tmp, 7));
}
public static double round(double value, int places) {
if (places < 0) {
throw new IllegalArgumentException();
}
BigDecimal bd = new BigDecimal(value);
bd = bd.setScale(places, RoundingMode.HALF_UP);
return bd.doubleValue();
}
}
```

Code above having this output

```
0.0
1.0E-4
6.0E-5
6.1E-5
6.08E-5
```

`tmp`

and`x`

?3more comments