Answer
Photoshop only deals in whole pixels when sizing the canvas. 12cm x 5cm = 340.157px x 141.732px. Photoshop is simply rounding each dimension to the nearest pixel.
Attribution
Source : Link , Question Author : coder3641 , Answer Author : 13ruce