DivideBy

x/=c

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

Details

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

Examples

open allclose all

Basic Examples  (1)

Scope  (4)

Divide by a numerical value:

Divide by a symbolic value:

Divide all values in a list by a scalar:

Divide all values in a list by another list:

The first argument to DivideBy need not be a symbol:

Properties & Relations  (2)

DivideBy is a short form of this assignment:

TimesBy is closely related:

Possible Issues  (1)

A variable to be divided must have an initial value:

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

Text

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

BibTeX

@misc{reference.wolfram_2021_divideby, author="Wolfram Research", title="{DivideBy}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/DivideBy.html}", note=[Accessed: 21-October-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_divideby, organization={Wolfram Research}, title={DivideBy}, year={1988}, url={https://reference.wolfram.com/language/ref/DivideBy.html}, note=[Accessed: 21-October-2021 ]}

CMS

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

APA

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