WLJS LogoWLJS Notebook

MixedFractionParts

MixedFractionParts[expr] gives the list {IntegerPart[expr], FractionalPart[expr]}.

Examples

Get the integer and fractional parts of a number:

MixedFractionParts[7/3]
(* {2, 1/3} *)

Works with negative numbers:

MixedFractionParts[-7/3]
(* {-3, 2/3} *)

With real numbers:

MixedFractionParts[3.75]
(* {3, 0.75} *)

Please visit the official Wolfram Language Reference for more details.

On this page