This is the result of running your code. Can you see that it is not accurate enough?
Long is a long integer variable, and double is a double-precision floating-point number (actually a decimal).
Then here b/ 1000 is equal to 12, because b is long, his calculation result will also be long.
Therefore, it is necessary to forcibly replace b with double type before calculation, so as to ensure that the accuracy is not missed.