Handling negative numbers on formatNumber