Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Mathematical Functions > Integer Functions > Divisible >

Divisible

Divisible
yields True if n is divisible by m, and yields False if it is not.
  • Divisible works for integers or rational numbers n and m.
  • Divisible works with exact numeric quantities, as well as explicit numbers.
  • 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.
Test whether 10 is divisible by 3:
Test whether 10 is divisible by 3:
In[1]:=
Click for copyable input
Out[1]=
Divisible works with numbers of any size:
Divisible threads itself element-wise over lists:
Symbolic forms of numeric quantities:
Rational numbers:
Gaussian integers:
Numeric quantities:
With symbolic inputs, Divisible stays unevaluated:
Select numbers that are divisible by 3:
Highlight numbers that are divisible by 3:
Show numbers that divide exactly:
Divisible is False unless is an integer:
Divisible does not automatically resolve the value:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF