sqrt((12 in)^2 + (45 cm)^2) will give proper result but sqrt(12 in^2 + 45 cm^2) will be calculated as sqrt(12 * (in^2) + 45 * (cm^2))