It is actually 53 binary places, which translates to 15 stable decimal places, meaning that if you round a start out with a number with 15 decimal places, convert it to a double
, and then round the double
back to 15 decimal places you'll get the same number. To uniquely represent a double
you need 17 decimal places (meaning that for every number with 17 decimal places, there's a unique closest double
) which is why 17 places are showing up, but not all 17-decimal numbers map to different double
values (like in the examples in the other answers).