FractionalPart
✖
FractionalPart
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 allBasic Examples (3)Summary of the most common use cases
Find the fractional part of a real number:

https://wolfram.com/xid/0h2koqh55u-jv0

Find the fractional part of a negative real number:

https://wolfram.com/xid/0h2koqh55u-nznea4

Plot over a subset of the reals:

https://wolfram.com/xid/0h2koqh55u-g6gok9

Scope (31)Survey of the scope of standard use cases
Numerical Evaluation (6)

https://wolfram.com/xid/0h2koqh55u-l274ju


https://wolfram.com/xid/0h2koqh55u-fko0mv


https://wolfram.com/xid/0h2koqh55u-wlv0g


https://wolfram.com/xid/0h2koqh55u-hfml09


https://wolfram.com/xid/0h2koqh55u-b0wt9

The precision of the output tracks the precision of the input:

https://wolfram.com/xid/0h2koqh55u-y7k4a

Evaluate efficiently at high precision:

https://wolfram.com/xid/0h2koqh55u-di5gcr


https://wolfram.com/xid/0h2koqh55u-bq2c6r

Compute the elementwise values of an array using automatic threading:

https://wolfram.com/xid/0h2koqh55u-thgd2

Or compute the matrix FractionalPart function using MatrixFunction:

https://wolfram.com/xid/0h2koqh55u-o5jpo

Compute average-case statistical intervals using Around:

https://wolfram.com/xid/0h2koqh55u-cw18bq

Specific Values (6)
Values of FractionalPart at fixed points:

https://wolfram.com/xid/0h2koqh55u-nww7l


https://wolfram.com/xid/0h2koqh55u-b38rdw

Value at Infinity:

https://wolfram.com/xid/0h2koqh55u-bmqd0y


https://wolfram.com/xid/0h2koqh55u-ia2x93

Manipulate FractionalPart symbolically:

https://wolfram.com/xid/0h2koqh55u-fl6


https://wolfram.com/xid/0h2koqh55u-m6f

Find a value of x for which the FractionalPart[x]=0.5:

https://wolfram.com/xid/0h2koqh55u-f2hrld


https://wolfram.com/xid/0h2koqh55u-bqseix

Visualization (4)
Plot the FractionalPart function:

https://wolfram.com/xid/0h2koqh55u-ecj8m7

Plot scaled FractionalPart functions:

https://wolfram.com/xid/0h2koqh55u-dtmpet

Plot FractionalPart in three dimensions:

https://wolfram.com/xid/0h2koqh55u-i75zi3

Visualize FractionalPart in the complex plane:

https://wolfram.com/xid/0h2koqh55u-ypd4a1

Function Properties (11)
FractionalPart is defined for all real and complex inputs:

https://wolfram.com/xid/0h2koqh55u-cl7ele


https://wolfram.com/xid/0h2koqh55u-c4ycek

Function range of FractionalPart:

https://wolfram.com/xid/0h2koqh55u-evf2yr

FractionalPart is an odd function:

https://wolfram.com/xid/0h2koqh55u-7ve37k

FractionalPart can be made periodic on the reals by adding one to its value on the negative reals:

https://wolfram.com/xid/0h2koqh55u-3eox8z

FractionalPart is not an analytic function:

https://wolfram.com/xid/0h2koqh55u-h5x4l2

It has both singularities and discontinuities:

https://wolfram.com/xid/0h2koqh55u-mdtl3h


https://wolfram.com/xid/0h2koqh55u-mn5jws

FractionalPart is neither nondecreasing nor nonincreasing:

https://wolfram.com/xid/0h2koqh55u-nlz7s

FractionalPart is not injective:

https://wolfram.com/xid/0h2koqh55u-poz8g


https://wolfram.com/xid/0h2koqh55u-ctca0g

FractionalPart is not surjective:

https://wolfram.com/xid/0h2koqh55u-cxk3a6


https://wolfram.com/xid/0h2koqh55u-frlnsr

FractionalPart is neither non-negative nor non-positive:

https://wolfram.com/xid/0h2koqh55u-84dui

FractionalPart is neither convex nor concave:

https://wolfram.com/xid/0h2koqh55u-8kku21

TraditionalForm formatting:

https://wolfram.com/xid/0h2koqh55u-k04k7r

Differentiation and Integration (4)
First derivative with respect to x:

https://wolfram.com/xid/0h2koqh55u-krpoah

Second derivative with respect to x:

https://wolfram.com/xid/0h2koqh55u-z33jv


https://wolfram.com/xid/0h2koqh55u-ym0


https://wolfram.com/xid/0h2koqh55u-72hmf

Applications (7)Sample problems that can be solved with this function
Find the first few digits of , using Stirling's approximation:

https://wolfram.com/xid/0h2koqh55u-d43d93

Plot fractional parts of powers:

https://wolfram.com/xid/0h2koqh55u-ywg


https://wolfram.com/xid/0h2koqh55u-mfxr8y

Plot fractional parts of powers of a Pisot number:

https://wolfram.com/xid/0h2koqh55u-b9yz64

Iterate the shift map with a rational initial condition and plot the result:

https://wolfram.com/xid/0h2koqh55u-ddsf6a


https://wolfram.com/xid/0h2koqh55u


https://wolfram.com/xid/0h2koqh55u-ngscv9

See the degradation in precision for approximate real numbers:

https://wolfram.com/xid/0h2koqh55u-g8o9g1


https://wolfram.com/xid/0h2koqh55u-knneqa


https://wolfram.com/xid/0h2koqh55u-bg8us0

Make a Bernoulli polynomial periodic and plot it:

https://wolfram.com/xid/0h2koqh55u-ppo7b

Properties & Relations (3)Properties of the function, and connections to other functions

https://wolfram.com/xid/0h2koqh55u-kc0c97

Convert FractionalPart to Piecewise:

https://wolfram.com/xid/0h2koqh55u-ddh

Denest FractionalPart functions:

https://wolfram.com/xid/0h2koqh55u-bct64g

Possible Issues (2)Common pitfalls and unexpected behavior
Guard digits influence the result of FractionalPart:

https://wolfram.com/xid/0h2koqh55u-dt4m0y


https://wolfram.com/xid/0h2koqh55u-cidilk


https://wolfram.com/xid/0h2koqh55u-s51cd

Numerical decision procedures with default settings cannot simplify this expression:

https://wolfram.com/xid/0h2koqh55u-ncskiq


Using a larger setting for $MaxExtraPrecision gives the expected result:

https://wolfram.com/xid/0h2koqh55u-g1yn61

Neat Examples (1)Surprising or curious use cases
Convergence of the Fourier series of FractionalPart:

https://wolfram.com/xid/0h2koqh55u-cgln5e

Wolfram Research (1996), FractionalPart, Wolfram Language function, https://reference.wolfram.com/language/ref/FractionalPart.html.
Text
Wolfram Research (1996), FractionalPart, Wolfram Language function, https://reference.wolfram.com/language/ref/FractionalPart.html.
Wolfram Research (1996), FractionalPart, Wolfram Language function, https://reference.wolfram.com/language/ref/FractionalPart.html.
CMS
Wolfram Language. 1996. "FractionalPart." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FractionalPart.html.
Wolfram Language. 1996. "FractionalPart." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FractionalPart.html.
APA
Wolfram Language. (1996). FractionalPart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FractionalPart.html
Wolfram Language. (1996). FractionalPart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FractionalPart.html
BibTeX
@misc{reference.wolfram_2025_fractionalpart, author="Wolfram Research", title="{FractionalPart}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/FractionalPart.html}", note=[Accessed: 05-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_fractionalpart, organization={Wolfram Research}, title={FractionalPart}, year={1996}, url={https://reference.wolfram.com/language/ref/FractionalPart.html}, note=[Accessed: 05-June-2025
]}