TimesBy

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)

Scope  (4)

Multiply by a numerical value:

Multiply by a symbolic value:

Multiply all values in a list by a scalar:

Multiply all values in a list by another list:

The first argument to TimesBy need not be a symbol:

Applications  (1)

Find the first power of two above one million:

Properties & Relations  (2)

TimesBy is a short form of this assignment:

DivideBy is closely related:

Possible Issues  (1)

A variable to be multiplied must have an initial value:

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.

CMS

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_timesby, organization={Wolfram Research}, title={TimesBy}, year={1988}, url={https://reference.wolfram.com/language/ref/TimesBy.html}, note=[Accessed: 17-December-2024 ]}