Same with RTW and M2TW. In ETW it just goes by fraction it seems. If you merge units and one is 39 the other 41, it takes the xp of the 41 even if the 39 was borderline next level even. It seems to work slightly differently with retraining, where even having 8 xp1 units left would result in a full xp1 unit afterwards (does not apply to higher xp, just xp1) which is odd.