Fractional part

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

The fractional part or decimal part[1] of a non‐negative real number is the excess beyond that number's integer part. If the latter is defined as the largest integer not greater than x, called floor of x or , its fractional part can be written as:


For a positive number written in a conventional positional numeral system (such as binary or decimal), its fractional part hence corresponds to the digits appearing after the radix point.

For negative numbers

However, in case of negative numbers, there are various conflicting ways to extend the fractional part function to them: It is either defined in the same way as for positive numbers, i.e. by (Graham, Knuth & Patashnik 1992),[2] or as the part of the number to the right of the radix point, (Daintith 2004),[3] finally, by the odd function [4]

with as the smallest integer not less than x, also called the ceiling of x. By consequence, we may get, for example, three different values for the fractional part of just one x: let it be −1.3, its fractional part will be 0.7 according to the first definition, 0.3 according to the second definition, and −0.3 according to the third definition, whose result can also be obtained in a straightforward way by


Unique decomposition into integer and fractional parts

Under the first definition all real numbers can be written in the form , where is the number to the left of the radix point, and the remaining fractional part is a nonnegative real number less than one. If is a positive rational number, then the fractional part of can be expressed in the form , where and are integers and . For example, if x = 1.05, then the fractional part of x is 0.05 and can be expressed as 5 / 100 = 1 / 20.

Relation to continued fractions

Every real number can be essentially uniquely represented as a continued fraction, namely as the sum of its integer part and the reciprocal of its fractional part which is written as the sum of its integer part and the reciprocal of its fractional part, and so on.

See also


  1. ^ "Decimal part". Retrieved 2018-02-15.
  2. ^ Graham, Ronald L.; Knuth, Donald E.; Patashnik, Oren (1992), Concrete mathematics: a foundation for computer science, Addison-Wesley, p. 70, ISBN 0-201-14236-8
  3. ^ John Daintith (2004). A Dictionary of Computing. Oxford University Press.
  4. ^ Weisstein, Eric W. "Fractional Part." From MathWorld--A Wolfram Web Resource
Retrieved from ""
This content was retrieved from Wikipedia :
This page is based on the copyrighted Wikipedia article "Fractional part"; it is used under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC-BY-SA). You may redistribute it, verbatim or modified, providing that you comply with the terms of the CC-BY-SA