Fractional part
The fractional part or decimal part[1] of a non‐negative real number x{displaystyle x} 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 ⌊x⌋{displaystyle lfloor xrfloor }, its fractional part can be written as:
frac(x)=x−⌊x⌋,x>0{displaystyle operatorname {frac} (x)=x-lfloor xrfloor ,;x>0}.
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.
Contents
1 For negative numbers
2 Unique decomposition into integer and fractional parts
3 Relation to continued fractions
4 See also
5 References
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 frac(x)=x−⌊x⌋{displaystyle operatorname {frac} (x)=x-lfloor xrfloor } (Graham, Knuth & Patashnik 1992),[2] or as the part of the number to the right of the radix point, frac(x)=|x|−⌊|x|⌋{displaystyle operatorname {frac} (x)=|x|-lfloor |x|rfloor } (Daintith 2004),[3] finally, by the odd function [4]
- frac(x)={x−⌊x⌋x≥0x−⌈x⌉x<0{displaystyle operatorname {frac} (x)={begin{cases}x-lfloor xrfloor &xgeq 0\x-lceil xrceil &x<0end{cases}}}
with ⌈x⌉{displaystyle lceil xrceil } 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
frac(x)=x−⌊|x|⌋⋅sgn(x){displaystyle operatorname {frac} (x)=x-lfloor |x|rfloor cdot operatorname {sgn} (x)}.
Unique decomposition into integer and fractional parts
Under the first definition all real numbers can be written in the form n+r{displaystyle n+r}, where n{displaystyle n} is the number to the left of the radix point, and the remaining fractional part r{displaystyle r} is a nonnegative real number less than one. If x{displaystyle x} is a positive rational number, then the fractional part of x{displaystyle x} can be expressed in the form p/q{displaystyle p/q}, where p{displaystyle p} and q{displaystyle q} are integers and 0≤p<q{displaystyle 0leq p<q}. 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
Floor and ceiling functions, the main article on fractional parts- Equidistributed sequence
- One-parameter group
- Pisot–Vijayaraghavan number
- Significand
- Quotient space (linear algebra)
References
^ "Decimal part". OxfordDictionaries.com. Retrieved 2018-02-15..mw-parser-output cite.citation{font-style:inherit}.mw-parser-output .citation q{quotes:"""""""'""'"}.mw-parser-output .citation .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-maint{display:none;color:#33aa33;margin-left:0.3em}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}
^ 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
^ John Daintith (2004). A Dictionary of Computing. Oxford University Press.
^ Weisstein, Eric W. "Fractional Part." From MathWorld--A Wolfram Web Resource