NumberCompose

NumberCompose[{c1,,cn},{u1,,un}]

returns the quantity c1 u1++cn un.

Details

  • The basis {u1,,un} is typically a list of nonincreasing positive numbers.
  • In NumberCompose[clist,ulist] the length of clist can be smaller than the length of ulist, and then clist is effectively padded with zeros on the left.

Examples

open allclose all

Basic Examples  (2)

Add different denominations of money:

In[1]:=
Click for copyable input
Out[1]=

Add amounts of days, hours, minutes, and seconds to return seconds:

In[1]:=
Click for copyable input
Out[1]=

Scope  (1)

Properties & Relations  (4)

See Also

NumberDecompose  Dot  Inner  FromDigits  MixedRadix

Introduced in 2015
(10.2)