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:

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

Scope  (1)

Compose exact numbers:

Compose inexact numbers:

Properties & Relations  (4)

The basic operation of NumberDecompose is Dot:

If the list of coefficients is shorter than the list of units, the former is left padded with zeros:

FromDMS is a special case of NumberCompose:

FromDigits with a MixedRadix specification performs a NumberCompose operation:

Wolfram Research (2015), NumberCompose, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberCompose.html.

Text

Wolfram Research (2015), NumberCompose, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberCompose.html.

CMS

Wolfram Language. 2015. "NumberCompose." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NumberCompose.html.

APA

Wolfram Language. (2015). NumberCompose. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NumberCompose.html

BibTeX

@misc{reference.wolfram_2024_numbercompose, author="Wolfram Research", title="{NumberCompose}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/NumberCompose.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_numbercompose, organization={Wolfram Research}, title={NumberCompose}, year={2015}, url={https://reference.wolfram.com/language/ref/NumberCompose.html}, note=[Accessed: 21-December-2024 ]}