Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Fractional part
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==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 <math>\operatorname{frac} (x)=x-\lfloor x \rfloor</math> {{harv|Graham|Knuth|Patashnik|1992}},<ref>{{citation | title=Concrete mathematics: a foundation for computer science | first1=Ronald L. | last1=Graham | author-link1=Ronald Graham | first2=Donald E. | last2=Knuth | author-link2=Donald Knuth | first3=Oren | last3=Patashnik | author-link3=Oren Patashnik | publisher=Addison-Wesley | isbn=0-201-14236-8 | year=1992 | page=70 }}</ref> or as the part of the number to the right of the radix point <math>\operatorname{frac} (x)=|x|-\lfloor |x| \rfloor</math> {{harv|Daintith|2004}},<ref>{{citation|title=A Dictionary of Computing|first=John|last=Daintith|date=2004|publisher=Oxford University Press}}</ref> or by the [[odd function]]:<ref>[http://mathworld.wolfram.com/FractionalPart.html Weisstein, Eric W. "Fractional Part." From MathWorld--A Wolfram Web Resource]</ref> :<math>\operatorname{frac} (x)=\begin{cases} x - \lfloor x \rfloor & x \ge 0 \\ x - \lceil x \rceil & x < 0 \end{cases}</math> with <math> \lceil x \rceil</math> as the smallest integer not less than {{mvar|x}}, also called the [[ceiling function|ceiling]] of {{mvar|x}}. By consequence, we may get, for example, three different values for the fractional part of just one {{mvar|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 :<math>\operatorname{frac} (x)= x - \lfloor |x| \rfloor \cdot \sgn(x)</math>. The <math>x - \lfloor x \rfloor</math> and the "odd function" definitions permit for unique decomposition of any real number {{mvar|x}} to the [[addition|sum]] of its integer and fractional parts, where "integer part" refers to <math>\lfloor x \rfloor</math> or <math>\lfloor |x| \rfloor \cdot \sgn(x)</math> respectively. These two definitions of fractional-part function also provide [[idempotence]]. The fractional part defined via difference from [[floor function|ββ―β]] is usually denoted by [[curly brace]]s: :<math>\{ x \} := x-\lfloor x \rfloor.</math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)