FractionalPart

FractionalPart[x]

gives the fractional part of x.

Details

  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • FractionalPart[x] in effect takes all digits to the right of the decimal point and drops the others.
  • FractionalPart[x]+IntegerPart[x] is always exactly x.
  • FractionalPart[x] yields a result when x is any numeric quantity, whether or not it is an explicit number.
  • For exact numeric quantities, FractionalPart internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
  • FractionalPart applies separately to real and imaginary parts of complex numbers.
  • FractionalPart automatically threads over lists.

Examples

open allclose all

Basic Examples  (1)

Find the fractional part of a real number:

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

Scope  (5)

Generalizations & Extensions  (3)

Applications  (6)

Properties & Relations  (3)

Possible Issues  (2)

Neat Examples  (1)

See Also

IntegerPart  Mod  Floor  Ceiling  Round

Tutorials

Introduced in 1996
(3.0)