I understand that if the last digit is 5 days, the first digit is discarded if it is an even number, and if it is an odd digit, it is raised to an even number.
In that picture, I want to know why the front digit is 0.8565 instead of 0.8564.
Python3 is in use.
rounding
We created a demo. Based on Python 3.6. I hope it's helpful.
'%0.5f % 0.85645' ==> 0.85645
'%0.5f % 0.85644' ==> 0.85644
'%0.4f % 0.85645' ==> 0.8565
'%0.4f % 0.85644' ==> 0.8564
'%0.3f % 0.85645' ==> 0.856
'%0.3f % 0.85644' ==> 0.856
© 2024 OneMinuteCode. All rights reserved.