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
Floor and ceiling functions
(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!
{{Short description|Nearest integers from a number}} {{Use dmy dates|date=May 2023}} {{multiple image | align = right | direction = vertical | header = Floor and ceiling functions | width = 200 | image1 = Floor function.svg | caption1 = Floor function | image2 = Ceiling function.svg | caption2 = Ceiling function }} In [[mathematics]], the '''floor function''' is the [[function (mathematics)|function]] that takes as input a [[real number]] {{mvar|x}}, and gives as output the greatest [[integer]] less than or equal to {{mvar|x}}, denoted {{math|β''x''β}} or {{math|floor(''x'')}}. Similarly, the '''ceiling function''' maps {{mvar|x}} to the least integer greater than or equal to {{math|''x''}}, denoted {{math|β''x''β}} or {{math|ceil(''x'')}}.<ref>Graham, Knuth, & Patashnik, Ch. 3.1</ref> For example, for floor: {{math|β2.4β {{=}} 2}}, {{math|β−2.4β {{=}} −3}}, and for ceiling: {{math|β2.4β {{=}} 3}}, and {{math|β−2.4β {{=}} −2}}. The floor of {{mvar|x}} is also called the '''integral part''', '''integer part''', '''greatest integer''', or '''entier''' of {{mvar|x}}, and was historically denoted {{math|[''x'']}} (among other notations).<ref> 1) Luke Heaton, ''A Brief History of Mathematical Thought'', 2015, {{isbn|1472117158}} (n.p.) <br/>2) Albert A. Blank ''et al.'', ''Calculus: Differential Calculus'', 1968, p. 259 <br/>3) John W. Warris, Horst Stocker, ''Handbook of mathematics and computational science'', 1998, {{isbn|0387947469}}, p. 151 </ref> However, the same term, ''integer part'', is also used for [[truncation]] towards zero, which differs from the floor function for negative numbers. For an integer {{mvar|n}}, {{math|β''n''β {{=}} β''n''β {{=}} ''n''}}. Although {{math|floor(''x'' + 1)}} and {{math|ceil(''x'')}} produce graphs that appear exactly alike, they are not the same when the value of {{mvar|x}} is an exact integer. For example, when {{math|''x'' {{=}} 2.0001}}, {{math|β2.0001 + 1β {{=}} β2.0001β {{=}} 3}}. However, if {{math|''x'' {{=}} 2}}, then {{math|β2 + 1β {{=}} 3}}, while {{math|β2β {{=}} 2}}. {| class="wikitable" title |+Examples ! ''x'' ! Floor {{math|β''x''β}} ! Ceiling {{math|β''x''β}} ! [[Fractional part]] {{math|{''x''} }} |- ! 2 | 2 | 2 | 0 |- ! 2.0001 | 2 | 3 | 0.0001 |- ! 2.4 | 2 | 3 | 0.4 |- ! 2.9 | 2 | 3 | 0.9 |- ! 2.999 | 2 | 3 | 0.999 |- ! −2.7 | −3 | −2 | 0.3 |- ! −2 | −2 | −2 | 0 |}
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)