FractionalPart
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 allBasic Examples (3)
Scope (31)
Numerical Evaluation (6)
The precision of the output tracks the precision of the input:
Evaluate efficiently at high precision:
Compute the elementwise values of an array using automatic threading:
Or compute the matrix FractionalPart function using MatrixFunction:
Compute average-case statistical intervals using Around:
Specific Values (6)
Values of FractionalPart at fixed points:
Value at Infinity:
Manipulate FractionalPart symbolically:
Find a value of x for which the FractionalPart[x]=0.5:
Visualization (4)
Plot the FractionalPart function:
Plot scaled FractionalPart functions:
Plot FractionalPart in three dimensions:
Visualize FractionalPart in the complex plane:
Function Properties (11)
FractionalPart is defined for all real and complex inputs:
Function range of FractionalPart:
FractionalPart is an odd function:
FractionalPart can be made periodic on the reals by adding one to its value on the negative reals:
FractionalPart is not an analytic function:
It has both singularities and discontinuities:
FractionalPart is neither nondecreasing nor nonincreasing:
FractionalPart is not injective:
FractionalPart is not surjective:
FractionalPart is neither non-negative nor non-positive:
FractionalPart is neither convex nor concave:
TraditionalForm formatting:
Applications (7)
Properties & Relations (3)
Possible Issues (2)
Guard digits influence the result of FractionalPart:
Numerical decision procedures with default settings cannot simplify this expression:
Using a larger setting for $MaxExtraPrecision gives the expected result:
Neat Examples (1)
Convergence of the Fourier series of FractionalPart:
Text
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.
APA
Wolfram Language. (1996). FractionalPart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FractionalPart.html