docs: def calc_significand(prefix, dpd_bits, num_bits):
      """
      prefix: High bits integer value
      dpd_bits: dpd encoded bits
      num_bits: bit length of dpd_bits
      """
      # https://en.wikipedia.org/wiki/Decimal128_floating-point_format#Densely_packed_decimal_significand_field
      num_segments = num_bits // 10
      segments = []
      for i in range(num_segments):
          segments.append(dpd_bits & 0b1111111111)
          dpd_bits >>= 10
      segments.reverse()
  
      v = prefix
      for dpd in segments:
          v = v * 1000 + dpd_to_int(dpd)
  
      return v