Divisible

Divisible[n,m]

yields True if n is divisible by m, and yields False if it is not.

Details

  • Divisible[n,m] works for integers or rational numbers n and m.
  • Divisible works with exact numeric quantities, as well as explicit numbers.
  • Divisible works with exact complex numbers.
  • Divisible[n,m] yields True only if n/m is an integer.
  • Divisible[n,m] is effectively equivalent to Mod[n,m]==0.
  • For exact numeric quantities, Divisible internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
  • Divisible[n,m] can be entered as .
  • can be entered as \[Divides] or divides.

Examples

open allclose all

Basic Examples  (1)

Test whether 10 is divisible by 3:

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

Scope  (2)

Generalizations & Extensions  (5)

Applications  (3)

Possible Issues  (2)

See Also

Mod  GCD  Divisors  Quotient  CoprimeQ  PrimeQ  EvenQ  Round

Tutorials

Introduced in 2007
(6.0)