Hard dimensions vs layer height

This is one of those computer / math problems with printing I have always wondered. Let’s say you make a 5 inch cube. How does the printer resolve this with the layer height at a specific dimension because when it doesn’t divide evenly? It has to do it some how because the object is 5 inches and so it much change the last layer height - maybe? Just curious and thanks if you know.

Check here:

That is set by the setting in Slic3r what you put as first Layer and what you put in as the following layers mine is a heavy layer first .035 and a.030 for the rest of the part . . I also Changed a line in Marlin so as to make parts almost dead on in Sizes for All 3 axis when I make a part on SketchUp 3.25 inches or 82.55 mm it comes out to that size . .

Since filament printing is not that acurate (melted plastic swells and shrinks during the printing process, it is unlikely that your print will be exactly 5” on any side, anyway. If you do need an EXACT dimension, I would recommend PTO ing large and manually (I.e. sanding) fine tuning the final size.