Use total/decimal digits instead of size/digits

Related to #704