In terms of hp without decimal in gaming and related with max hp changing, the best solution should be to rounding down (or nearest zero rounding) the result, and keep minimum hp to 1 when max hp changes. In case for minimum hp unit (1 in this case) to have changed into lower max hp then they'll die too, hence why minimum 1 hp as the result is logical.
This is exactly why heroes won't die in Dota2 when toggling off armlet while having 1 hp
This is exactly why heroes won't die in Dota2 when toggling off armlet while having 1 hp