WOLFRAM

x*=c

multiplies x by c and returns the new value of x.

Details

  • x*=c is equivalent to x=x*c.
  • TimesBy has the attribute HoldFirst.
  • In TimesBy[x,c], x can be a symbol or other expression with an existing value. »

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Out[1]=1
Out[2]=2

Scope  (4)Survey of the scope of standard use cases

Multiply by a numerical value:

Out[1]=1

Multiply by a symbolic value:

Out[1]=1

Multiply all values in a list by a scalar:

Out[1]=1
Out[2]=2

Multiply all values in a list by another list:

Out[3]=3

The first argument to TimesBy need not be a symbol:

Out[1]=1
Out[2]=2
Out[3]=3

Applications  (1)Sample problems that can be solved with this function

Find the first power of two above one million:

Out[1]=1

Properties & Relations  (2)Properties of the function, and connections to other functions

TimesBy is a short form of this assignment:

Out[1]=1

DivideBy is closely related:

Out[1]=1
Out[2]=2

Possible Issues  (1)Common pitfalls and unexpected behavior

A variable to be multiplied must have an initial value:

Out[1]=1
Wolfram Research (1988), TimesBy, Wolfram Language function, https://reference.wolfram.com/language/ref/TimesBy.html.
Wolfram Research (1988), TimesBy, Wolfram Language function, https://reference.wolfram.com/language/ref/TimesBy.html.

Text

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

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

CMS

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

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

APA

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

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

BibTeX

@misc{reference.wolfram_2025_timesby, author="Wolfram Research", title="{TimesBy}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/TimesBy.html}", note=[Accessed: 29-April-2025 ]}

@misc{reference.wolfram_2025_timesby, author="Wolfram Research", title="{TimesBy}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/TimesBy.html}", note=[Accessed: 29-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_timesby, organization={Wolfram Research}, title={TimesBy}, year={1988}, url={https://reference.wolfram.com/language/ref/TimesBy.html}, note=[Accessed: 29-April-2025 ]}

@online{reference.wolfram_2025_timesby, organization={Wolfram Research}, title={TimesBy}, year={1988}, url={https://reference.wolfram.com/language/ref/TimesBy.html}, note=[Accessed: 29-April-2025 ]}