Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Division By 1000 for a double variable

Hi all

I have a simple query .

Please follow the following java code

double d1 = 22058310.53;

System.out.println("Output Value = " + d1/1000);

This gives me an output

Output Value = 220583.10530000002

whereas the correct o/p should be 220583.1053

Can anyone pls provide a solution to get the correct result.

regards

NIlesh Taunk.

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question