double r = 11.631; double theta = 21.4;
In the debugger, these are shown as 11.631000000000000
11.631000000000000
If you are using Java and you need accuracy, use the BigDecimal class for floating point calculations. It is slower but safer.