We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I think I may have phrased my original question confusingly. In the instructions, there are these statements:
Since floats lose precision, it's not advised to use them in integral calculations.
To solve this problem, future Python modules included a new type of division called integer division given by the operator //.
I'm confused on why integer division is given as a solution to float division's loss of precision if integer division results in even more loss of precision.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Python: Division
You are viewing a single comment's thread. Return to all comments →
I think I may have phrased my original question confusingly. In the instructions, there are these statements:
Since floats lose precision, it's not advised to use them in integral calculations.
To solve this problem, future Python modules included a new type of division called integer division given by the operator //.
I'm confused on why integer division is given as a solution to float division's loss of precision if integer division results in even more loss of precision.