CINXE.COM

Floor and ceiling functions - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Floor and ceiling functions - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"2e7887e1-e633-4f34-a2a5-a7e21332c4ef","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Floor_and_ceiling_functions","wgTitle":"Floor and ceiling functions","wgCurRevisionId":1252833377,"wgRevisionId":1252833377,"wgArticleId":54267,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","Use dmy dates from May 2023","Articles containing French-language text","All articles lacking reliable references","Articles lacking reliable references from February 2022","All articles with unsourced statements","Articles with unsourced statements from November 2018","Articles with unsourced statements from March 2019","Commons category link is on Wikidata","Special functions" ,"Mathematical notation","Unary operations"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Floor_and_ceiling_functions","wgRelevantArticleId":54267,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgRedirectedFrom":"Integer_part","wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":40000,"wgInternalRedirectTargetUrl":"/wiki/Floor_and_ceiling_functions","wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true, "wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q215193","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.math.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES =["mediawiki.action.view.redirect","ext.cite.ux-enhancements","mediawiki.page.media","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.quicksurveys.init","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.cite.styles%7Cext.math.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Floor_function.svg/1200px-Floor_function.svg.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="1200"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Floor_function.svg/800px-Floor_function.svg.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="800"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Floor_function.svg/640px-Floor_function.svg.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="640"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Floor and ceiling functions - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Floor_and_ceiling_functions"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Floor_and_ceiling_functions"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Floor_and_ceiling_functions rootpage-Floor_and_ceiling_functions skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&amp;returnto=Floor+and+ceiling+functions" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&amp;returnto=Floor+and+ceiling+functions" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=Floor+and+ceiling+functions" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=Floor+and+ceiling+functions" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Notation" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Notation"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Notation</span> </div> </a> <ul id="toc-Notation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Definition_and_properties" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Definition_and_properties"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Definition and properties</span> </div> </a> <button aria-controls="toc-Definition_and_properties-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Definition and properties subsection</span> </button> <ul id="toc-Definition_and_properties-sublist" class="vector-toc-list"> <li id="toc-Equivalences" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Equivalences"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Equivalences</span> </div> </a> <ul id="toc-Equivalences-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Monotonicity" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Monotonicity"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Monotonicity</span> </div> </a> <ul id="toc-Monotonicity-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Relations_among_the_functions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Relations_among_the_functions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Relations among the functions</span> </div> </a> <ul id="toc-Relations_among_the_functions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Quotients" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Quotients"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Quotients</span> </div> </a> <ul id="toc-Quotients-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Nested_divisions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Nested_divisions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Nested divisions</span> </div> </a> <ul id="toc-Nested_divisions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Continuity_and_series_expansions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Continuity_and_series_expansions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.6</span> <span>Continuity and series expansions</span> </div> </a> <ul id="toc-Continuity_and_series_expansions-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Applications" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Applications"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Applications</span> </div> </a> <button aria-controls="toc-Applications-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Applications subsection</span> </button> <ul id="toc-Applications-sublist" class="vector-toc-list"> <li id="toc-Mod_operator" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Mod_operator"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Mod operator</span> </div> </a> <ul id="toc-Mod_operator-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Quadratic_reciprocity" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Quadratic_reciprocity"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Quadratic reciprocity</span> </div> </a> <ul id="toc-Quadratic_reciprocity-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Rounding" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Rounding"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3</span> <span>Rounding</span> </div> </a> <ul id="toc-Rounding-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Number_of_digits" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Number_of_digits"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.4</span> <span>Number of digits</span> </div> </a> <ul id="toc-Number_of_digits-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Number_of_strings_without_repeated_characters" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Number_of_strings_without_repeated_characters"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.5</span> <span>Number of strings without repeated characters</span> </div> </a> <ul id="toc-Number_of_strings_without_repeated_characters-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Factors_of_factorials" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Factors_of_factorials"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.6</span> <span>Factors of factorials</span> </div> </a> <ul id="toc-Factors_of_factorials-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Beatty_sequence" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Beatty_sequence"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.7</span> <span>Beatty sequence</span> </div> </a> <ul id="toc-Beatty_sequence-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Euler&#039;s_constant_(γ)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Euler&#039;s_constant_(γ)"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.8</span> <span>Euler's constant (γ)</span> </div> </a> <ul id="toc-Euler&#039;s_constant_(γ)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Riemann_zeta_function_(ζ)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Riemann_zeta_function_(ζ)"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.9</span> <span>Riemann zeta function (ζ)</span> </div> </a> <ul id="toc-Riemann_zeta_function_(ζ)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Formulas_for_prime_numbers" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Formulas_for_prime_numbers"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.10</span> <span>Formulas for prime numbers</span> </div> </a> <ul id="toc-Formulas_for_prime_numbers-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Solved_problems" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Solved_problems"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.11</span> <span>Solved problems</span> </div> </a> <ul id="toc-Solved_problems-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Unsolved_problem" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Unsolved_problem"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.12</span> <span>Unsolved problem</span> </div> </a> <ul id="toc-Unsolved_problem-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Computer_implementations" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Computer_implementations"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Computer implementations</span> </div> </a> <ul id="toc-Computer_implementations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Citations" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Citations"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Citations</span> </div> </a> <ul id="toc-Citations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Floor and ceiling functions</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 31 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-31" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">31 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%AF%D8%A7%D9%84%D8%AA%D8%A7%D9%86_%D8%B3%D9%82%D9%81%D9%8A%D8%A9_%D9%88%D8%A3%D8%B1%D8%B6%D9%8A%D8%A9" title="دالتان سقفية وأرضية – Arabic" lang="ar" hreflang="ar" data-title="دالتان سقفية وأرضية" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F_%D1%81%D0%BA%D0%BE%D0%B1%D0%BA%D0%B0" title="Функция скобка – Bulgarian" lang="bg" hreflang="bg" data-title="Функция скобка" data-language-autonym="Български" data-language-local-name="Bulgarian" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-cv mw-list-item"><a href="https://cv.wikipedia.org/wiki/%D0%A2%D1%83%D0%BB%D0%BB%D0%B8_%D0%BF%D0%B0%D0%B9" title="Тулли пай – Chuvash" lang="cv" hreflang="cv" data-title="Тулли пай" data-language-autonym="Чӑвашла" data-language-local-name="Chuvash" class="interlanguage-link-target"><span>Чӑвашла</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Cel%C3%A1_%C4%8D%C3%A1st" title="Celá část – Czech" lang="cs" hreflang="cs" data-title="Celá část" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Abrundungsfunktion_und_Aufrundungsfunktion" title="Abrundungsfunktion und Aufrundungsfunktion – German" lang="de" hreflang="de" data-title="Abrundungsfunktion und Aufrundungsfunktion" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/%CE%A3%CF%85%CE%BD%CE%B1%CF%81%CF%84%CE%AE%CF%83%CE%B5%CE%B9%CF%82_%CE%B4%CE%B1%CF%80%CE%AD%CE%B4%CE%BF%CF%85_%CE%BA%CE%B1%CE%B9_%CE%BF%CF%81%CE%BF%CF%86%CE%AE%CF%82" title="Συναρτήσεις δαπέδου και οροφής – Greek" lang="el" hreflang="el" data-title="Συναρτήσεις δαπέδου και οροφής" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Funciones_de_parte_entera" title="Funciones de parte entera – Spanish" lang="es" hreflang="es" data-title="Funciones de parte entera" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/Planka_kaj_plafona_funkcioj" title="Planka kaj plafona funkcioj – Esperanto" lang="eo" hreflang="eo" data-title="Planka kaj plafona funkcioj" data-language-autonym="Esperanto" data-language-local-name="Esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Zoru-funtzio_eta_sabai-funtzio" title="Zoru-funtzio eta sabai-funtzio – Basque" lang="eu" hreflang="eu" data-title="Zoru-funtzio eta sabai-funtzio" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%AA%D9%88%D8%A7%D8%A8%D8%B9_%D8%AC%D8%B2%D8%A1_%D8%B5%D8%AD%DB%8C%D8%AD_%D9%88_%D8%B3%D9%82%D9%81" title="توابع جزء صحیح و سقف – Persian" lang="fa" hreflang="fa" data-title="توابع جزء صحیح و سقف" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Partie_enti%C3%A8re_et_partie_fractionnaire" title="Partie entière et partie fractionnaire – French" lang="fr" hreflang="fr" data-title="Partie entière et partie fractionnaire" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Funci%C3%B3ns_chan_e_teito" title="Funcións chan e teito – Galician" lang="gl" hreflang="gl" data-title="Funcións chan e teito" data-language-autonym="Galego" data-language-local-name="Galician" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EB%B0%94%EB%8B%A5_%ED%95%A8%EC%88%98%EC%99%80_%EC%B2%9C%EC%9E%A5_%ED%95%A8%EC%88%98" title="바닥 함수와 천장 함수 – Korean" lang="ko" hreflang="ko" data-title="바닥 함수와 천장 함수" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/%D4%B1%D5%B4%D5%A2%D5%B8%D5%B2%D5%BB_%D5%B4%D5%A1%D5%BD" title="Ամբողջ մաս – Armenian" lang="hy" hreflang="hy" data-title="Ամբողջ մաս" data-language-autonym="Հայերեն" data-language-local-name="Armenian" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Fungsi_bilangan_bulat_terbesar_dan_terkecil" title="Fungsi bilangan bulat terbesar dan terkecil – Indonesian" lang="id" hreflang="id" data-title="Fungsi bilangan bulat terbesar dan terkecil" data-language-autonym="Bahasa Indonesia" data-language-local-name="Indonesian" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Parte_intera" title="Parte intera – Italian" lang="it" hreflang="it" data-title="Parte intera" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%A4%D7%95%D7%A0%D7%A7%D7%A6%D7%99%D7%99%D7%AA_%D7%94%D7%A2%D7%A8%D7%9A_%D7%94%D7%A9%D7%9C%D7%9D" title="פונקציית הערך השלם – Hebrew" lang="he" hreflang="he" data-title="פונקציית הערך השלם" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-kk mw-list-item"><a href="https://kk.wikipedia.org/wiki/%D0%A1%D0%B0%D0%BD_%D0%B0%D0%BD%D1%82%D1%8C%D0%B5%D1%81%D1%96" title="Сан антьесі – Kazakh" lang="kk" hreflang="kk" data-title="Сан антьесі" data-language-autonym="Қазақша" data-language-local-name="Kazakh" class="interlanguage-link-target"><span>Қазақша</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Eg%C3%A9szr%C3%A9sz" title="Egészrész – Hungarian" lang="hu" hreflang="hu" data-title="Egészrész" data-language-autonym="Magyar" data-language-local-name="Hungarian" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E5%BA%8A%E9%96%A2%E6%95%B0%E3%81%A8%E5%A4%A9%E4%BA%95%E9%96%A2%E6%95%B0" title="床関数と天井関数 – Japanese" lang="ja" hreflang="ja" data-title="床関数と天井関数" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Pod%C5%82oga_i_sufit" title="Podłoga i sufit – Polish" lang="pl" hreflang="pl" data-title="Podłoga i sufit" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Parte_inteira" title="Parte inteira – Portuguese" lang="pt" hreflang="pt" data-title="Parte inteira" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%A6%D0%B5%D0%BB%D0%B0%D1%8F_%D1%87%D0%B0%D1%81%D1%82%D1%8C" title="Целая часть – Russian" lang="ru" hreflang="ru" data-title="Целая часть" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sq mw-list-item"><a href="https://sq.wikipedia.org/wiki/Funksionet_dysheme_dhe_tavan" title="Funksionet dysheme dhe tavan – Albanian" lang="sq" hreflang="sq" data-title="Funksionet dysheme dhe tavan" data-language-autonym="Shqip" data-language-local-name="Albanian" class="interlanguage-link-target"><span>Shqip</span></a></li><li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/Celi_del" title="Celi del – Slovenian" lang="sl" hreflang="sl" data-title="Celi del" data-language-autonym="Slovenščina" data-language-local-name="Slovenian" class="interlanguage-link-target"><span>Slovenščina</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Lattia-_ja_kattofunktio" title="Lattia- ja kattofunktio – Finnish" lang="fi" hreflang="fi" data-title="Lattia- ja kattofunktio" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Golv-_och_takfunktionerna" title="Golv- och takfunktionerna – Swedish" lang="sv" hreflang="sv" data-title="Golv- och takfunktionerna" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%9F%E0%B8%B1%E0%B8%87%E0%B8%81%E0%B9%8C%E0%B8%8A%E0%B8%B1%E0%B8%99%E0%B8%9E%E0%B8%B7%E0%B9%89%E0%B8%99%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%9F%E0%B8%B1%E0%B8%87%E0%B8%81%E0%B9%8C%E0%B8%8A%E0%B8%B1%E0%B8%99%E0%B9%80%E0%B8%9E%E0%B8%94%E0%B8%B2%E0%B8%99" title="ฟังก์ชันพื้นและฟังก์ชันเพดาน – Thai" lang="th" hreflang="th" data-title="ฟังก์ชันพื้นและฟังก์ชันเพดาน" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%A6%D1%96%D0%BB%D0%B0_%D1%87%D0%B0%D1%81%D1%82%D0%B8%D0%BD%D0%B0_%D1%87%D0%B8%D1%81%D0%BB%D0%B0" title="Ціла частина числа – Ukrainian" lang="uk" hreflang="uk" data-title="Ціла частина числа" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/Ph%E1%BA%A7n_nguy%C3%AAn" title="Phần nguyên – Vietnamese" lang="vi" hreflang="vi" data-title="Phần nguyên" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E5%8F%96%E6%95%B4%E5%87%BD%E6%95%B0" title="取整函数 – Chinese" lang="zh" hreflang="zh" data-title="取整函数" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q215193#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Floor_and_ceiling_functions" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Floor_and_ceiling_functions" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Floor_and_ceiling_functions"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Floor_and_ceiling_functions"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Floor_and_ceiling_functions" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Floor_and_ceiling_functions" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;oldid=1252833377" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&amp;page=Floor_and_ceiling_functions&amp;id=1252833377&amp;wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFloor_and_ceiling_functions"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFloor_and_ceiling_functions"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=Floor_and_ceiling_functions&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:Floor_and_ceiling" hreflang="en"><span>Wikimedia Commons</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q215193" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"><span class="mw-redirectedfrom">(Redirected from <a href="/w/index.php?title=Integer_part&amp;redirect=no" class="mw-redirect" title="Integer part">Integer part</a>)</span></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Nearest integers from a number</div> <p class="mw-empty-elt"> </p> <style data-mw-deduplicate="TemplateStyles:r1237032888/mw-parser-output/.tmulti">.mw-parser-output .tmulti .multiimageinner{display:flex;flex-direction:column}.mw-parser-output .tmulti .trow{display:flex;flex-direction:row;clear:left;flex-wrap:wrap;width:100%;box-sizing:border-box}.mw-parser-output .tmulti .tsingle{margin:1px;float:left}.mw-parser-output .tmulti .theader{clear:both;font-weight:bold;text-align:center;align-self:center;background-color:transparent;width:100%}.mw-parser-output .tmulti .thumbcaption{background-color:transparent}.mw-parser-output .tmulti .text-align-left{text-align:left}.mw-parser-output .tmulti .text-align-right{text-align:right}.mw-parser-output .tmulti .text-align-center{text-align:center}@media all and (max-width:720px){.mw-parser-output .tmulti .thumbinner{width:100%!important;box-sizing:border-box;max-width:none!important;align-items:center}.mw-parser-output .tmulti .trow{justify-content:center}.mw-parser-output .tmulti .tsingle{float:none!important;max-width:100%!important;box-sizing:border-box;text-align:center}.mw-parser-output .tmulti .tsingle .thumbcaption{text-align:left}.mw-parser-output .tmulti .trow>.thumbcaption{text-align:center}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .tmulti .multiimageinner img{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .tmulti .multiimageinner img{background-color:white}}</style><div class="thumb tmulti tright"><div class="thumbinner multiimageinner" style="width:204px;max-width:204px"><div class="trow"><div class="theader">Floor and ceiling functions</div></div><div class="trow"><div class="tsingle" style="width:202px;max-width:202px"><div class="thumbimage"><span typeof="mw:File"><a href="/wiki/File:Floor_function.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Floor_function.svg/200px-Floor_function.svg.png" decoding="async" width="200" height="200" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Floor_function.svg/300px-Floor_function.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Floor_function.svg/400px-Floor_function.svg.png 2x" data-file-width="1000" data-file-height="1000" /></a></span></div><div class="thumbcaption">Floor function</div></div></div><div class="trow"><div class="tsingle" style="width:202px;max-width:202px"><div class="thumbimage"><span typeof="mw:File"><a href="/wiki/File:Ceiling_function.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Ceiling_function.svg/200px-Ceiling_function.svg.png" decoding="async" width="200" height="200" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Ceiling_function.svg/300px-Ceiling_function.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Ceiling_function.svg/400px-Ceiling_function.svg.png 2x" data-file-width="1000" data-file-height="1000" /></a></span></div><div class="thumbcaption">Ceiling function</div></div></div></div></div> <p>In <a href="/wiki/Mathematics" title="Mathematics">mathematics</a>, the <b>floor function</b> is the <a href="/wiki/Function_(mathematics)" title="Function (mathematics)">function</a> that takes as input a <a href="/wiki/Real_number" title="Real number">real number</a> <span class="texhtml mvar" style="font-style:italic;">x</span>, and gives as output the greatest <a href="/wiki/Integer" title="Integer">integer</a> less than or equal to <span class="texhtml mvar" style="font-style:italic;">x</span>, denoted <span class="texhtml">⌊<i>x</i>⌋</span> or <span class="texhtml">floor(<i>x</i>)</span>. Similarly, the <b>ceiling function</b> maps <span class="texhtml mvar" style="font-style:italic;">x</span> to the least integer greater than or equal to <span class="texhtml"><i>x</i></span>, denoted <span class="texhtml">⌈<i>x</i>⌉</span> or <span class="texhtml">ceil(<i>x</i>)</span>.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup> </p><p>For example, for floor: <span class="texhtml">⌊2.4⌋ = 2</span>, <span class="texhtml">⌊&#8722;2.4⌋ = &#8722;3</span>, and for ceiling: <span class="texhtml">⌈2.4⌉ = 3</span>, and <span class="texhtml">⌈&#8722;2.4⌉ = &#8722;2</span>. </p><p>The floor of <span class="texhtml mvar" style="font-style:italic;">x</span> is also called the <b>integral part</b>, <b>integer part</b>, <b>greatest integer</b>, or <b>entier</b> of <span class="texhtml mvar" style="font-style:italic;">x</span>, and was historically denoted <span class="texhtml">[<i>x</i>]</span> (among other notations).<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup> However, the same term, <i>integer part</i>, is also used for <a href="/wiki/Truncation" title="Truncation">truncation</a> towards zero, which differs from the floor function for negative numbers. </p><p>For <span class="texhtml mvar" style="font-style:italic;">n</span> an integer, <span class="texhtml">⌊<i>n</i>⌋ = ⌈<i>n</i>⌉ = <i>n</i></span>. </p><p>Although <span class="texhtml">floor(<i>x+1</i>)</span> and <span class="texhtml">ceil(<i>x</i>)</span> produce graphs that appear exactly alike, they are not the same when the value of x is an exact integer. For example, when <span class="texhtml mvar" style="font-style:italic;">x</span>=2.0001; <span class="texhtml">⌊2.0001+1⌋ = ⌈2.0001⌉ = 3</span>. However, if <span class="texhtml mvar" style="font-style:italic;">x</span>=2, then <span class="texhtml">⌊2+1⌋ = 3</span>, while <span class="texhtml">⌈2⌉ = 2</span>. </p> <table class="wikitable" title=""> <caption>Examples </caption> <tbody><tr> <th><i>x</i> </th> <th>Floor <span class="texhtml">⌊<i>x</i>⌋</span> </th> <th>Ceiling <span class="texhtml">⌈<i>x</i>⌉</span> </th> <th><a href="/wiki/Fractional_part" title="Fractional part">Fractional part</a> <span class="texhtml">{<i>x</i>} </span> </th></tr> <tr> <th>2 </th> <td>2 </td> <td>2 </td> <td>0 </td></tr> <tr> <th>2.0001 </th> <td>2 </td> <td>3 </td> <td>0.0001 </td></tr> <tr> <th>2.4 </th> <td>2 </td> <td>3 </td> <td>0.4 </td></tr> <tr> <th>2.9 </th> <td>2 </td> <td>3 </td> <td>0.9 </td></tr> <tr> <th>2.999 </th> <td>2 </td> <td>3 </td> <td>0.999 </td></tr> <tr> <th>&#8722;2.7 </th> <td>&#8722;3 </td> <td>&#8722;2 </td> <td>0.3 </td></tr> <tr> <th>&#8722;2 </th> <td>&#8722;2 </td> <td>&#8722;2 </td> <td>0 </td></tr></tbody></table> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Notation">Notation</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=1" title="Edit section: Notation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <i>integral part</i> or <i>integer part</i> of a number (<span title="French-language text"><i lang="fr">partie entière</i></span> in the original) was first defined in 1798 by <a href="/wiki/Adrien-Marie_Legendre" title="Adrien-Marie Legendre">Adrien-Marie Legendre</a> in his proof of the <a href="/wiki/Legendre%27s_formula" title="Legendre&#39;s formula">Legendre's formula</a>. </p><p><a href="/wiki/Carl_Friedrich_Gauss" title="Carl Friedrich Gauss">Carl Friedrich Gauss</a> introduced the square bracket notation <span class="texhtml">[<i>x</i>]</span> in his third proof of <a href="/wiki/Quadratic_reciprocity" title="Quadratic reciprocity">quadratic reciprocity</a> (1808).<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> This remained the standard<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> in mathematics until <a href="/wiki/Kenneth_E._Iverson" title="Kenneth E. Iverson">Kenneth E. Iverson</a> introduced, in his 1962 book <i>A Programming Language</i>, the names "floor" and "ceiling" and the corresponding notations <span class="texhtml">⌊<i>x</i>⌋</span> and <span class="texhtml">⌈<i>x</i>⌉</span>.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> (Iverson used square brackets for a different purpose, the <a href="/wiki/Iverson_bracket" title="Iverson bracket">Iverson bracket</a> notation.) Both notations are now used in mathematics, although Iverson's notation will be followed in this article. </p><p>In some sources, boldface or double brackets <span class="texhtml">⟦<i>x</i>⟧</span> are used for floor, and reversed brackets <span class="texhtml">⟧<i>x</i>⟦</span> or <span class="texhtml">]<i>x</i>[</span> for ceiling.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> </p><p>The <a href="/wiki/Fractional_part" title="Fractional part">fractional part</a> is the <a href="/wiki/Sawtooth_function" class="mw-redirect" title="Sawtooth function">sawtooth function</a>, denoted by <span class="texhtml">{<i>x</i>} </span> for real <span class="texhtml mvar" style="font-style:italic;">x</span> and defined by the formula </p> <dl><dd><span class="texhtml">{<i>x</i>} = <i>x</i> − ⌊<i>x</i>⌋</span><sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup></dd></dl> <p>For all <i>x</i>, </p> <dl><dd><span class="texhtml">0 ≤ {<i>x</i>} &lt; 1</span>.</dd></dl> <p>These characters are provided in Unicode: </p> <ul><li><span class="nowrap"><style data-mw-deduplicate="TemplateStyles:r886049734">.mw-parser-output .monospaced{font-family:monospace,monospace}</style><span class="monospaced">U+2308</span>&#x20;</span><span style="font-size:125%;line-height:1em">&#x2308;</span> <span style="font-variant: small-caps; text-transform: lowercase;">LEFT CEILING</span> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">&amp;lceil;, &amp;LeftCeiling;</span>)</li> <li><span class="nowrap"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">U+2309</span>&#x20;</span><span style="font-size:125%;line-height:1em">&#x2309;</span> <span style="font-variant: small-caps; text-transform: lowercase;">RIGHT CEILING</span> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">&amp;rceil;, &amp;RightCeiling;</span>)</li> <li><span class="nowrap"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">U+230A</span>&#x20;</span><span style="font-size:125%;line-height:1em">&#x230a;</span> <span style="font-variant: small-caps; text-transform: lowercase;">LEFT FLOOR</span> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">&amp;LeftFloor;, &amp;lfloor;</span>)</li> <li><span class="nowrap"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">U+230B</span>&#x20;</span><span style="font-size:125%;line-height:1em">&#x230b;</span> <span style="font-variant: small-caps; text-transform: lowercase;">RIGHT FLOOR</span> (<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">&amp;rfloor;, &amp;RightFloor;</span>)</li></ul> <p>In the <a href="/wiki/LaTeX" title="LaTeX">LaTeX</a> typesetting system, these symbols can be specified with the <code><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">\lceil, \rceil, \lfloor, </span></code> and <code><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">\rfloor</span></code> commands in math mode. LaTeX has supported UTF-8 since 2018, so the Unicode characters can now be used directly.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> Larger versions are<code><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">\left\lceil, \right\rceil, \left\lfloor,</span></code> and <code><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886049734"><span class="monospaced">\right\rfloor</span></code>. </p> <div class="mw-heading mw-heading2"><h2 id="Definition_and_properties">Definition and properties</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=2" title="Edit section: Definition and properties"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Given real numbers <i>x</i> and <i>y</i>, integers <i>m</i> and <i>n</i> and the set of <a href="/wiki/Integer" title="Integer">integers</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/449494a083e0a1fda2b61c62b2f09b6bee4633dc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.55ex; height:2.176ex;" alt="{\displaystyle \mathbb {Z} }"></span>, floor and ceiling may be defined by the equations </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor =\max\{m\in \mathbb {Z} \mid m\leq x\},}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>=</mo> <mo movablelimits="true" form="prefix">max</mo> <mo fence="false" stretchy="false">{</mo> <mi>m</mi> <mo>&#x2208;<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> <mo>&#x2223;<!-- ∣ --></mo> <mi>m</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor =\max\{m\in \mathbb {Z} \mid m\leq x\},}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fa3d3a3f676cf464d51b138a376729f9327e2cb5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:28.628ex; height:2.843ex;" alt="{\displaystyle \lfloor x\rfloor =\max\{m\in \mathbb {Z} \mid m\leq x\},}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil x\rceil =\min\{n\in \mathbb {Z} \mid n\geq x\}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>=</mo> <mo movablelimits="true" form="prefix">min</mo> <mo fence="false" stretchy="false">{</mo> <mi>n</mi> <mo>&#x2208;<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> <mo>&#x2223;<!-- ∣ --></mo> <mi>n</mi> <mo>&#x2265;<!-- ≥ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lceil x\rceil =\min\{n\in \mathbb {Z} \mid n\geq x\}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ae3ebf931fd148a70cb6ebd7862b915e8fe37f31" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:26.886ex; height:2.843ex;" alt="{\displaystyle \lceil x\rceil =\min\{n\in \mathbb {Z} \mid n\geq x\}.}"></span></dd></dl> <p>Since there is exactly one integer in a <a href="/wiki/Half-open_interval" class="mw-redirect" title="Half-open interval">half-open interval</a> of length one, for any real number <i>x</i>, there are unique integers <i>m</i> and <i>n</i> satisfying the equation </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x-1&lt;m\leq x\leq n&lt;x+1.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo>&lt;</mo> <mi>m</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>x</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>n</mi> <mo>&lt;</mo> <mi>x</mi> <mo>+</mo> <mn>1.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x-1&lt;m\leq x\leq n&lt;x+1.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c9f617ac56046d25e1b70f934c69702ec3e1a696" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:28.471ex; height:2.343ex;" alt="{\displaystyle x-1&lt;m\leq x\leq n&lt;x+1.}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor =m}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>=</mo> <mi>m</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor =m}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/867789ab49fcd1f640b4d34be1b3d97142f0478d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.533ex; height:2.843ex;" alt="{\displaystyle \lfloor x\rfloor =m}"></span>&#160;and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil x\rceil =n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>=</mo> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lceil x\rceil =n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dcfbbaccccdc663f1f25cb3881f8c6fae47c9373" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.888ex; height:2.843ex;" alt="{\displaystyle \lceil x\rceil =n}"></span>&#160;may also be taken as the definition of floor and ceiling. </p> <div class="mw-heading mw-heading3"><h3 id="Equivalences">Equivalences</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=3" title="Edit section: Equivalences"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>These formulas can be used to simplify expressions involving floors and ceilings.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{alignedat}{3}\lfloor x\rfloor &amp;=m\ \ &amp;&amp;{\mbox{ if and only if }}&amp;m&amp;\leq x&lt;m+1,\\\lceil x\rceil &amp;=n&amp;&amp;{\mbox{ if and only if }}&amp;\ \ n-1&amp;&lt;x\leq n,\\\lfloor x\rfloor &amp;=m&amp;&amp;{\mbox{ if and only if }}&amp;x-1&amp;&lt;m\leq x,\\\lceil x\rceil &amp;=n&amp;&amp;{\mbox{ if and only if }}&amp;x&amp;\leq n&lt;x+1.\end{alignedat}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left" rowspacing="3pt" columnspacing="0em 0em 0em 0em 0em 0em" displaystyle="true"> <mtr> <mtd> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>m</mi> <mtext>&#xA0;</mtext> <mtext>&#xA0;</mtext> </mtd> <mtd /> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if and only if&#xA0;</mtext> </mstyle> </mrow> </mtd> <mtd> <mi>m</mi> </mtd> <mtd> <mi></mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>x</mi> <mo>&lt;</mo> <mi>m</mi> <mo>+</mo> <mn>1</mn> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>n</mi> </mtd> <mtd /> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if and only if&#xA0;</mtext> </mstyle> </mrow> </mtd> <mtd> <mtext>&#xA0;</mtext> <mtext>&#xA0;</mtext> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mtd> <mtd> <mi></mi> <mo>&lt;</mo> <mi>x</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>n</mi> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>m</mi> </mtd> <mtd /> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if and only if&#xA0;</mtext> </mstyle> </mrow> </mtd> <mtd> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mtd> <mtd> <mi></mi> <mo>&lt;</mo> <mi>m</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>x</mi> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mi>n</mi> </mtd> <mtd /> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if and only if&#xA0;</mtext> </mstyle> </mrow> </mtd> <mtd> <mi>x</mi> </mtd> <mtd> <mi></mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>n</mi> <mo>&lt;</mo> <mi>x</mi> <mo>+</mo> <mn>1.</mn> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{alignedat}{3}\lfloor x\rfloor &amp;=m\ \ &amp;&amp;{\mbox{ if and only if }}&amp;m&amp;\leq x&lt;m+1,\\\lceil x\rceil &amp;=n&amp;&amp;{\mbox{ if and only if }}&amp;\ \ n-1&amp;&lt;x\leq n,\\\lfloor x\rfloor &amp;=m&amp;&amp;{\mbox{ if and only if }}&amp;x-1&amp;&lt;m\leq x,\\\lceil x\rceil &amp;=n&amp;&amp;{\mbox{ if and only if }}&amp;x&amp;\leq n&lt;x+1.\end{alignedat}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6187dbb340ba86aaeb8a564919e4ed46f9ef33e6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -5.671ex; width:44.919ex; height:12.509ex;" alt="{\displaystyle {\begin{alignedat}{3}\lfloor x\rfloor &amp;=m\ \ &amp;&amp;{\mbox{ if and only if }}&amp;m&amp;\leq x&lt;m+1,\\\lceil x\rceil &amp;=n&amp;&amp;{\mbox{ if and only if }}&amp;\ \ n-1&amp;&lt;x\leq n,\\\lfloor x\rfloor &amp;=m&amp;&amp;{\mbox{ if and only if }}&amp;x-1&amp;&lt;m\leq x,\\\lceil x\rceil &amp;=n&amp;&amp;{\mbox{ if and only if }}&amp;x&amp;\leq n&lt;x+1.\end{alignedat}}}"></span></dd></dl> <p>In the language of <a href="/wiki/Order_theory" title="Order theory">order theory</a>, the floor function is a <a href="/wiki/Residuated_mapping" title="Residuated mapping">residuated mapping</a>, that is, part of a <a href="/wiki/Galois_connection" title="Galois connection">Galois connection</a>: it is the upper adjoint of the function that embeds the integers into the reals. </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}x&lt;n&amp;\;\;{\mbox{ if and only if }}&amp;\lfloor x\rfloor &amp;&lt;n,\\n&lt;x&amp;\;\;{\mbox{ if and only if }}&amp;n&amp;&lt;\lceil x\rceil ,\\x\leq n&amp;\;\;{\mbox{ if and only if }}&amp;\lceil x\rceil &amp;\leq n,\\n\leq x&amp;\;\;{\mbox{ if and only if }}&amp;n&amp;\leq \lfloor x\rfloor .\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mi>x</mi> <mo>&lt;</mo> <mi>n</mi> </mtd> <mtd> <mspace width="thickmathspace" /> <mspace width="thickmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if and only if&#xA0;</mtext> </mstyle> </mrow> </mtd> <mtd> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mtd> <mtd> <mi></mi> <mo>&lt;</mo> <mi>n</mi> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mi>n</mi> <mo>&lt;</mo> <mi>x</mi> </mtd> <mtd> <mspace width="thickmathspace" /> <mspace width="thickmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if and only if&#xA0;</mtext> </mstyle> </mrow> </mtd> <mtd> <mi>n</mi> </mtd> <mtd> <mi></mi> <mo>&lt;</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mi>x</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>n</mi> </mtd> <mtd> <mspace width="thickmathspace" /> <mspace width="thickmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if and only if&#xA0;</mtext> </mstyle> </mrow> </mtd> <mtd> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mtd> <mtd> <mi></mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>n</mi> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mi>n</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>x</mi> </mtd> <mtd> <mspace width="thickmathspace" /> <mspace width="thickmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if and only if&#xA0;</mtext> </mstyle> </mrow> </mtd> <mtd> <mi>n</mi> </mtd> <mtd> <mi></mi> <mo>&#x2264;<!-- ≤ --></mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}x&lt;n&amp;\;\;{\mbox{ if and only if }}&amp;\lfloor x\rfloor &amp;&lt;n,\\n&lt;x&amp;\;\;{\mbox{ if and only if }}&amp;n&amp;&lt;\lceil x\rceil ,\\x\leq n&amp;\;\;{\mbox{ if and only if }}&amp;\lceil x\rceil &amp;\leq n,\\n\leq x&amp;\;\;{\mbox{ if and only if }}&amp;n&amp;\leq \lfloor x\rfloor .\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e2f2c71f07e32dc80b76f2b2e3ca93463ae3eacf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -5.671ex; width:36.742ex; height:12.509ex;" alt="{\displaystyle {\begin{aligned}x&lt;n&amp;\;\;{\mbox{ if and only if }}&amp;\lfloor x\rfloor &amp;&lt;n,\\n&lt;x&amp;\;\;{\mbox{ if and only if }}&amp;n&amp;&lt;\lceil x\rceil ,\\x\leq n&amp;\;\;{\mbox{ if and only if }}&amp;\lceil x\rceil &amp;\leq n,\\n\leq x&amp;\;\;{\mbox{ if and only if }}&amp;n&amp;\leq \lfloor x\rfloor .\end{aligned}}}"></span></dd></dl> <p>These formulas show how adding an integer <span class="texhtml mvar" style="font-style:italic;">n</span> to the arguments affects the functions: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\lfloor x+n\rfloor &amp;=\lfloor x\rfloor +n,\\\lceil x+n\rceil &amp;=\lceil x\rceil +n,\\\{x+n\}&amp;=\{x\}.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo>+</mo> <mi>n</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>+</mo> <mi>n</mi> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo>+</mo> <mi>n</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>+</mo> <mi>n</mi> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo>+</mo> <mi>n</mi> <mo fence="false" stretchy="false">}</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\lfloor x+n\rfloor &amp;=\lfloor x\rfloor +n,\\\lceil x+n\rceil &amp;=\lceil x\rceil +n,\\\{x+n\}&amp;=\{x\}.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a02d0089e484be6122c0d349831acfaa10beaefc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.005ex; width:20.016ex; height:9.176ex;" alt="{\displaystyle {\begin{aligned}\lfloor x+n\rfloor &amp;=\lfloor x\rfloor +n,\\\lceil x+n\rceil &amp;=\lceil x\rceil +n,\\\{x+n\}&amp;=\{x\}.\end{aligned}}}"></span></dd></dl> <p>The above are never true if <span class="texhtml mvar" style="font-style:italic;">n</span> is not an integer; however, for every <span class="texhtml mvar" style="font-style:italic;">x</span> and <span class="texhtml mvar" style="font-style:italic;">y</span>, the following inequalities hold: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\lfloor x\rfloor +\lfloor y\rfloor &amp;\leq \lfloor x+y\rfloor \leq \lfloor x\rfloor +\lfloor y\rfloor +1,\\[3mu]\lceil x\rceil +\lceil y\rceil -1&amp;\leq \lceil x+y\rceil \leq \lceil x\rceil +\lceil y\rceil .\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.467em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>+</mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>y</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mtd> <mtd> <mi></mi> <mo>&#x2264;<!-- ≤ --></mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo>+</mo> <mi>y</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>&#x2264;<!-- ≤ --></mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>+</mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>y</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>+</mo> <mn>1</mn> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>+</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>y</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mtd> <mtd> <mi></mi> <mo>&#x2264;<!-- ≤ --></mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo>+</mo> <mi>y</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>&#x2264;<!-- ≤ --></mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>+</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>y</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\lfloor x\rfloor +\lfloor y\rfloor &amp;\leq \lfloor x+y\rfloor \leq \lfloor x\rfloor +\lfloor y\rfloor +1,\\[3mu]\lceil x\rceil +\lceil y\rceil -1&amp;\leq \lceil x+y\rceil \leq \lceil x\rceil +\lceil y\rceil .\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c51c4db96365020b998169d24d9df06a4db2b74d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:41.902ex; height:6.509ex;" alt="{\displaystyle {\begin{aligned}\lfloor x\rfloor +\lfloor y\rfloor &amp;\leq \lfloor x+y\rfloor \leq \lfloor x\rfloor +\lfloor y\rfloor +1,\\[3mu]\lceil x\rceil +\lceil y\rceil -1&amp;\leq \lceil x+y\rceil \leq \lceil x\rceil +\lceil y\rceil .\end{aligned}}}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Monotonicity">Monotonicity</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=4" title="Edit section: Monotonicity"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Both floor and ceiling functions are <a href="/wiki/Monotonic_function" title="Monotonic function">monotonically non-decreasing functions</a>: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}x_{1}\leq x_{2}&amp;\Rightarrow \lfloor x_{1}\rfloor \leq \lfloor x_{2}\rfloor ,\\x_{1}\leq x_{2}&amp;\Rightarrow \lceil x_{1}\rceil \leq \lceil x_{2}\rceil .\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>&#x2264;<!-- ≤ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo stretchy="false">&#x21D2;<!-- ⇒ --></mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>&#x2264;<!-- ≤ --></mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>&#x2264;<!-- ≤ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo stretchy="false">&#x21D2;<!-- ⇒ --></mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>&#x2264;<!-- ≤ --></mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}x_{1}\leq x_{2}&amp;\Rightarrow \lfloor x_{1}\rfloor \leq \lfloor x_{2}\rfloor ,\\x_{1}\leq x_{2}&amp;\Rightarrow \lceil x_{1}\rceil \leq \lceil x_{2}\rceil .\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2a01f81b7d4cd4065ec31dda8aabab1e4013eeae" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:24.875ex; height:6.176ex;" alt="{\displaystyle {\begin{aligned}x_{1}\leq x_{2}&amp;\Rightarrow \lfloor x_{1}\rfloor \leq \lfloor x_{2}\rfloor ,\\x_{1}\leq x_{2}&amp;\Rightarrow \lceil x_{1}\rceil \leq \lceil x_{2}\rceil .\end{aligned}}}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Relations_among_the_functions">Relations among the functions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=5" title="Edit section: Relations among the functions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>It is clear from the definitions that </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor \leq \lceil x\rceil ,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>&#x2264;<!-- ≤ --></mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor \leq \lceil x\rceil ,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d75aab25b2dcbdfe4ce59f321d17548a30c3888f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.534ex; height:2.843ex;" alt="{\displaystyle \lfloor x\rfloor \leq \lceil x\rceil ,}"></span> &#160; with equality if and only if <i>x</i> is an integer, i.e.</dd> <dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil x\rceil -\lfloor x\rfloor ={\begin{cases}0&amp;{\mbox{ if }}x\in \mathbb {Z} \\1&amp;{\mbox{ if }}x\not \in \mathbb {Z} \end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>&#x2212;<!-- − --></mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if&#xA0;</mtext> </mstyle> </mrow> <mi>x</mi> <mo>&#x2208;<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mtd> </mtr> <mtr> <mtd> <mn>1</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mtext>&#xA0;if&#xA0;</mtext> </mstyle> </mrow> <mi>x</mi> <mo>&#x2209;</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lceil x\rceil -\lfloor x\rfloor ={\begin{cases}0&amp;{\mbox{ if }}x\in \mathbb {Z} \\1&amp;{\mbox{ if }}x\not \in \mathbb {Z} \end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1ac10dc259547580611731069945c83bbbb7fe25" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:26.948ex; height:6.176ex;" alt="{\displaystyle \lceil x\rceil -\lfloor x\rfloor ={\begin{cases}0&amp;{\mbox{ if }}x\in \mathbb {Z} \\1&amp;{\mbox{ if }}x\not \in \mathbb {Z} \end{cases}}}"></span></dd></dl> <p>In fact, for integers <i>n</i>, both floor and ceiling functions are the <a href="/wiki/Identity_function" title="Identity function">identity</a>: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor n\rfloor =\lceil n\rceil =n.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>n</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>=</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>n</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>=</mo> <mi>n</mi> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor n\rfloor =\lceil n\rceil =n.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5a88a4bc04ed855e1e71231810a3ca86660aad49" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:15.157ex; height:2.843ex;" alt="{\displaystyle \lfloor n\rfloor =\lceil n\rceil =n.}"></span></dd></dl> <p>Negating the argument switches floor and ceiling and changes the sign: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\lfloor x\rfloor +\lceil -x\rceil &amp;=0\\-\lfloor x\rfloor &amp;=\lceil -x\rceil \\-\lceil x\rceil &amp;=\lfloor -x\rfloor \end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>+</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mo>&#x2212;<!-- − --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mn>0</mn> </mtd> </mtr> <mtr> <mtd> <mo>&#x2212;<!-- − --></mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mo>&#x2212;<!-- − --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mtd> </mtr> <mtr> <mtd> <mo>&#x2212;<!-- − --></mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mo>&#x2212;<!-- − --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\lfloor x\rfloor +\lceil -x\rceil &amp;=0\\-\lfloor x\rfloor &amp;=\lceil -x\rceil \\-\lceil x\rceil &amp;=\lfloor -x\rfloor \end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/663845468c42350da2a418d9bdbc68c65af963a0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.005ex; width:20.49ex; height:9.176ex;" alt="{\displaystyle {\begin{aligned}\lfloor x\rfloor +\lceil -x\rceil &amp;=0\\-\lfloor x\rfloor &amp;=\lceil -x\rceil \\-\lceil x\rceil &amp;=\lfloor -x\rfloor \end{aligned}}}"></span></dd></dl> <p>and: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor +\lfloor -x\rfloor ={\begin{cases}0&amp;{\text{if }}x\in \mathbb {Z} \\-1&amp;{\text{if }}x\not \in \mathbb {Z} ,\end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>+</mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mo>&#x2212;<!-- − --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if&#xA0;</mtext> </mrow> <mi>x</mi> <mo>&#x2208;<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mtd> </mtr> <mtr> <mtd> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if&#xA0;</mtext> </mrow> <mi>x</mi> <mo>&#x2209;</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> <mo>,</mo> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor +\lfloor -x\rfloor ={\begin{cases}0&amp;{\text{if }}x\in \mathbb {Z} \\-1&amp;{\text{if }}x\not \in \mathbb {Z} ,\end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/32153024108d786393c5a5a459af224938f53621" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:30.631ex; height:6.176ex;" alt="{\displaystyle \lfloor x\rfloor +\lfloor -x\rfloor ={\begin{cases}0&amp;{\text{if }}x\in \mathbb {Z} \\-1&amp;{\text{if }}x\not \in \mathbb {Z} ,\end{cases}}}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil x\rceil +\lceil -x\rceil ={\begin{cases}0&amp;{\text{if }}x\in \mathbb {Z} \\1&amp;{\text{if }}x\not \in \mathbb {Z} .\end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>+</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mo>&#x2212;<!-- − --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if&#xA0;</mtext> </mrow> <mi>x</mi> <mo>&#x2208;<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mtd> </mtr> <mtr> <mtd> <mn>1</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if&#xA0;</mtext> </mrow> <mi>x</mi> <mo>&#x2209;</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> <mo>.</mo> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lceil x\rceil +\lceil -x\rceil ={\begin{cases}0&amp;{\text{if }}x\in \mathbb {Z} \\1&amp;{\text{if }}x\not \in \mathbb {Z} .\end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fedac4592f94b559fefa0d7ea1f75c6a135b2567" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:28.822ex; height:6.176ex;" alt="{\displaystyle \lceil x\rceil +\lceil -x\rceil ={\begin{cases}0&amp;{\text{if }}x\in \mathbb {Z} \\1&amp;{\text{if }}x\not \in \mathbb {Z} .\end{cases}}}"></span></dd></dl> <p>Negating the argument complements the fractional part: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \{x\}+\{-x\}={\begin{cases}0&amp;{\text{if }}x\in \mathbb {Z} \\1&amp;{\text{if }}x\not \in \mathbb {Z} .\end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> <mo>+</mo> <mo fence="false" stretchy="false">{</mo> <mo>&#x2212;<!-- − --></mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if&#xA0;</mtext> </mrow> <mi>x</mi> <mo>&#x2208;<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> </mtd> </mtr> <mtr> <mtd> <mn>1</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if&#xA0;</mtext> </mrow> <mi>x</mi> <mo>&#x2209;</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">Z</mi> </mrow> <mo>.</mo> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \{x\}+\{-x\}={\begin{cases}0&amp;{\text{if }}x\in \mathbb {Z} \\1&amp;{\text{if }}x\not \in \mathbb {Z} .\end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9c37477380e64e1533ec88618cd0c6e39c4904c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:29.343ex; height:6.176ex;" alt="{\displaystyle \{x\}+\{-x\}={\begin{cases}0&amp;{\text{if }}x\in \mathbb {Z} \\1&amp;{\text{if }}x\not \in \mathbb {Z} .\end{cases}}}"></span></dd></dl> <p>The floor, ceiling, and fractional part functions are <a href="/wiki/Idempotence" title="Idempotence">idempotent</a>: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}{\big \lfloor }\lfloor x\rfloor {\big \rfloor }&amp;=\lfloor x\rfloor ,\\{\big \lceil }\lceil x\rceil {\big \rceil }&amp;=\lceil x\rceil ,\\{\big \{}\{x\}{\big \}}&amp;=\{x\}.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">&#x230A;</mo> </mrow> </mrow> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">&#x230B;</mo> </mrow> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">&#x2308;</mo> </mrow> </mrow> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">&#x2309;</mo> </mrow> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">{</mo> </mrow> </mrow> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">}</mo> </mrow> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}{\big \lfloor }\lfloor x\rfloor {\big \rfloor }&amp;=\lfloor x\rfloor ,\\{\big \lceil }\lceil x\rceil {\big \rceil }&amp;=\lceil x\rceil ,\\{\big \{}\{x\}{\big \}}&amp;=\{x\}.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0d611660608aa37aeda2250c5aaa553aabb54086" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.505ex; width:14.516ex; height:10.176ex;" alt="{\displaystyle {\begin{aligned}{\big \lfloor }\lfloor x\rfloor {\big \rfloor }&amp;=\lfloor x\rfloor ,\\{\big \lceil }\lceil x\rceil {\big \rceil }&amp;=\lceil x\rceil ,\\{\big \{}\{x\}{\big \}}&amp;=\{x\}.\end{aligned}}}"></span></dd></dl> <p>The result of nested floor or ceiling functions is the innermost function: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}{\big \lfloor }\lceil x\rceil {\big \rfloor }&amp;=\lceil x\rceil ,\\{\big \lceil }\lfloor x\rfloor {\big \rceil }&amp;=\lfloor x\rfloor \end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">&#x230A;</mo> </mrow> </mrow> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">&#x230B;</mo> </mrow> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">&#x2308;</mo> </mrow> </mrow> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">&#x2309;</mo> </mrow> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}{\big \lfloor }\lceil x\rceil {\big \rfloor }&amp;=\lceil x\rceil ,\\{\big \lceil }\lfloor x\rfloor {\big \rceil }&amp;=\lfloor x\rfloor \end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7f5e04da64abc078091cd86114633cfe05b17983" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.838ex; width:13.481ex; height:6.843ex;" alt="{\displaystyle {\begin{aligned}{\big \lfloor }\lceil x\rceil {\big \rfloor }&amp;=\lceil x\rceil ,\\{\big \lceil }\lfloor x\rfloor {\big \rceil }&amp;=\lfloor x\rfloor \end{aligned}}}"></span></dd></dl> <p>due to the identity property for integers. </p> <div class="mw-heading mw-heading3"><h3 id="Quotients">Quotients</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=6" title="Edit section: Quotients"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>If <i>m</i> and <i>n</i> are integers and <i>n</i> ≠ 0, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0\leq \left\{{\frac {m}{n}}\right\}\leq 1-{\frac {1}{|n|}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> <mo>&#x2264;<!-- ≤ --></mo> <mrow> <mo>{</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>m</mi> <mi>n</mi> </mfrac> </mrow> <mo>}</mo> </mrow> <mo>&#x2264;<!-- ≤ --></mo> <mn>1</mn> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> </mrow> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0\leq \left\{{\frac {m}{n}}\right\}\leq 1-{\frac {1}{|n|}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bec18ad4f6fbaa7e99b70a4afacb9ebd59611691" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:21.511ex; height:6.009ex;" alt="{\displaystyle 0\leq \left\{{\frac {m}{n}}\right\}\leq 1-{\frac {1}{|n|}}.}"></span></dd></dl> <p>If <i>n</i> is a positive integer<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor {\frac {x+m}{n}}\right\rfloor =\left\lfloor {\frac {\lfloor x\rfloor +m}{n}}\right\rfloor ,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>x</mi> <mo>+</mo> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>+</mo> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor {\frac {x+m}{n}}\right\rfloor =\left\lfloor {\frac {\lfloor x\rfloor +m}{n}}\right\rfloor ,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/66824749d7091486e854715f2077f36cd375f61f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:25.711ex; height:6.343ex;" alt="{\displaystyle \left\lfloor {\frac {x+m}{n}}\right\rfloor =\left\lfloor {\frac {\lfloor x\rfloor +m}{n}}\right\rfloor ,}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lceil {\frac {x+m}{n}}\right\rceil =\left\lceil {\frac {\lceil x\rceil +m}{n}}\right\rceil .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>x</mi> <mo>+</mo> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>+</mo> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lceil {\frac {x+m}{n}}\right\rceil =\left\lceil {\frac {\lceil x\rceil +m}{n}}\right\rceil .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/717d5159a662083812ad3c597fd345d259d97846" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:25.711ex; height:6.343ex;" alt="{\displaystyle \left\lceil {\frac {x+m}{n}}\right\rceil =\left\lceil {\frac {\lceil x\rceil +m}{n}}\right\rceil .}"></span></dd></dl> <p>If <i>m</i> is positive<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n=\left\lceil {\frac {n{\vphantom {1}}}{m}}\right\rceil +\left\lceil {\frac {n-1}{m}}\right\rceil +\dots +\left\lceil {\frac {n-m+1}{m}}\right\rceil ,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mi>m</mi> <mo>+</mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n=\left\lceil {\frac {n{\vphantom {1}}}{m}}\right\rceil +\left\lceil {\frac {n-1}{m}}\right\rceil +\dots +\left\lceil {\frac {n-m+1}{m}}\right\rceil ,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/07c55bb68bf4d843ddc13d96263386c5b515eabe" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:45.128ex; height:6.176ex;" alt="{\displaystyle n=\left\lceil {\frac {n{\vphantom {1}}}{m}}\right\rceil +\left\lceil {\frac {n-1}{m}}\right\rceil +\dots +\left\lceil {\frac {n-m+1}{m}}\right\rceil ,}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n=\left\lfloor {\frac {n{\vphantom {1}}}{m}}\right\rfloor +\left\lfloor {\frac {n+1}{m}}\right\rfloor +\dots +\left\lfloor {\frac {n+m-1}{m}}\right\rfloor .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>+</mo> <mi>m</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n=\left\lfloor {\frac {n{\vphantom {1}}}{m}}\right\rfloor +\left\lfloor {\frac {n+1}{m}}\right\rfloor +\dots +\left\lfloor {\frac {n+m-1}{m}}\right\rfloor .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/003a822866855873b9fb707d7205d8a4079aeb1f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:45.128ex; height:6.176ex;" alt="{\displaystyle n=\left\lfloor {\frac {n{\vphantom {1}}}{m}}\right\rfloor +\left\lfloor {\frac {n+1}{m}}\right\rfloor +\dots +\left\lfloor {\frac {n+m-1}{m}}\right\rfloor .}"></span></dd></dl> <p>For <i>m</i> = 2 these imply </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n=\left\lfloor {\frac {n{\vphantom {1}}}{2}}\right\rfloor +\left\lceil {\frac {n{\vphantom {1}}}{2}}\right\rceil .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mn>2</mn> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mn>2</mn> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n=\left\lfloor {\frac {n{\vphantom {1}}}{2}}\right\rfloor +\left\lceil {\frac {n{\vphantom {1}}}{2}}\right\rceil .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f3652010d4270406e8e67ee99971c9253caa9d83" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:18.25ex; height:6.176ex;" alt="{\displaystyle n=\left\lfloor {\frac {n{\vphantom {1}}}{2}}\right\rfloor +\left\lceil {\frac {n{\vphantom {1}}}{2}}\right\rceil .}"></span></dd></dl> <p>More generally,<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup> for positive <i>m</i> (See <a href="/wiki/Hermite%27s_identity" title="Hermite&#39;s identity">Hermite's identity</a>) </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil mx\rceil =\left\lceil x\right\rceil +\left\lceil x-{\frac {1}{m}}\right\rceil +\dots +\left\lceil x-{\frac {m-1}{m}}\right\rceil ,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>m</mi> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mi>x</mi> <mo>&#x2309;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x2308;</mo> <mrow> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>m</mi> </mfrac> </mrow> </mrow> <mo>&#x2309;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x2308;</mo> <mrow> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>m</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> </mrow> <mo>&#x2309;</mo> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lceil mx\rceil =\left\lceil x\right\rceil +\left\lceil x-{\frac {1}{m}}\right\rceil +\dots +\left\lceil x-{\frac {m-1}{m}}\right\rceil ,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/562255ffe997a9aa1eacd6c04046429b19c7190d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:47.723ex; height:6.176ex;" alt="{\displaystyle \lceil mx\rceil =\left\lceil x\right\rceil +\left\lceil x-{\frac {1}{m}}\right\rceil +\dots +\left\lceil x-{\frac {m-1}{m}}\right\rceil ,}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor mx\rfloor =\left\lfloor x\right\rfloor +\left\lfloor x+{\frac {1}{m}}\right\rfloor +\dots +\left\lfloor x+{\frac {m-1}{m}}\right\rfloor .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>m</mi> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mi>x</mi> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow> <mi>x</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>m</mi> </mfrac> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow> <mi>x</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>m</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor mx\rfloor =\left\lfloor x\right\rfloor +\left\lfloor x+{\frac {1}{m}}\right\rfloor +\dots +\left\lfloor x+{\frac {m-1}{m}}\right\rfloor .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3dd5c7696ac3e96258f4e16094cc3476698e1805" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:47.723ex; height:6.176ex;" alt="{\displaystyle \lfloor mx\rfloor =\left\lfloor x\right\rfloor +\left\lfloor x+{\frac {1}{m}}\right\rfloor +\dots +\left\lfloor x+{\frac {m-1}{m}}\right\rfloor .}"></span></dd></dl> <p>The following can be used to convert floors to ceilings and vice versa (<i>m</i> positive)<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">&#91;</span>15<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lceil {\frac {n{\vphantom {1}}}{m}}\right\rceil =\left\lfloor {\frac {n+m-1}{m}}\right\rfloor =\left\lfloor {\frac {n-1}{m}}\right\rfloor +1,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>+</mo> <mi>m</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mn>1</mn> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lceil {\frac {n{\vphantom {1}}}{m}}\right\rceil =\left\lfloor {\frac {n+m-1}{m}}\right\rfloor =\left\lfloor {\frac {n-1}{m}}\right\rfloor +1,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/be0623375e7c5e5e0da5168f2b94d4d898b18d88" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:39.203ex; height:6.176ex;" alt="{\displaystyle \left\lceil {\frac {n{\vphantom {1}}}{m}}\right\rceil =\left\lfloor {\frac {n+m-1}{m}}\right\rfloor =\left\lfloor {\frac {n-1}{m}}\right\rfloor +1,}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor {\frac {n{\vphantom {1}}}{m}}\right\rfloor =\left\lceil {\frac {n-m+1}{m}}\right\rceil =\left\lceil {\frac {n+1}{m}}\right\rceil -1,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mi>m</mi> <mo>+</mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor {\frac {n{\vphantom {1}}}{m}}\right\rfloor =\left\lceil {\frac {n-m+1}{m}}\right\rceil =\left\lceil {\frac {n+1}{m}}\right\rceil -1,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f896dbf36caa06dbc0e541f7e8bd1f72aba1686b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:39.203ex; height:6.176ex;" alt="{\displaystyle \left\lfloor {\frac {n{\vphantom {1}}}{m}}\right\rfloor =\left\lceil {\frac {n-m+1}{m}}\right\rceil =\left\lceil {\frac {n+1}{m}}\right\rceil -1,}"></span></dd></dl> <p>For all <i>m</i> and <i>n</i> strictly positive integers:<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">&#91;</span>16<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{k=1}^{n-1}\left\lfloor {\frac {km}{n}}\right\rfloor ={\frac {(m-1)(n-1)+\gcd(m,n)-1}{2}},}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </munderover> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>k</mi> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>m</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>+</mo> <mo movablelimits="true" form="prefix">gcd</mo> <mo stretchy="false">(</mo> <mi>m</mi> <mo>,</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mn>2</mn> </mfrac> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{k=1}^{n-1}\left\lfloor {\frac {km}{n}}\right\rfloor ={\frac {(m-1)(n-1)+\gcd(m,n)-1}{2}},}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/21702d871cf1de026dda91f2b70b3e3303681a8a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:46.79ex; height:7.343ex;" alt="{\displaystyle \sum _{k=1}^{n-1}\left\lfloor {\frac {km}{n}}\right\rfloor ={\frac {(m-1)(n-1)+\gcd(m,n)-1}{2}},}"></span></dd></dl> <p>which, for positive and <a href="/wiki/Coprime" class="mw-redirect" title="Coprime">coprime</a> <i>m</i> and <i>n</i>, reduces to </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{k=1}^{n-1}\left\lfloor {\frac {km}{n}}\right\rfloor ={\tfrac {1}{2}}(m-1)(n-1),}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </munderover> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>k</mi> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo stretchy="false">(</mo> <mi>m</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{k=1}^{n-1}\left\lfloor {\frac {km}{n}}\right\rfloor ={\tfrac {1}{2}}(m-1)(n-1),}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/69acd64c5dde291b7e49544796efd8381f67b10e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:31.003ex; height:7.343ex;" alt="{\displaystyle \sum _{k=1}^{n-1}\left\lfloor {\frac {km}{n}}\right\rfloor ={\tfrac {1}{2}}(m-1)(n-1),}"></span></dd></dl> <p>and similarly for the ceiling and fractional part functions (still for positive and <a href="/wiki/Coprime" class="mw-redirect" title="Coprime">coprime</a> <i>m</i> and <i>n</i>), </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{k=1}^{n-1}\left\lceil {\frac {km}{n}}\right\rceil ={\tfrac {1}{2}}(m+1)(n-1),}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </munderover> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>k</mi> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo stretchy="false">(</mo> <mi>m</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{k=1}^{n-1}\left\lceil {\frac {km}{n}}\right\rceil ={\tfrac {1}{2}}(m+1)(n-1),}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/97a0c4ce644207a41af096d3c3e25347240cf15c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:31.003ex; height:7.343ex;" alt="{\displaystyle \sum _{k=1}^{n-1}\left\lceil {\frac {km}{n}}\right\rceil ={\tfrac {1}{2}}(m+1)(n-1),}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{k=1}^{n-1}\left\{{\frac {km}{n}}\right\}={\tfrac {1}{2}}(n-1).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </munderover> <mrow> <mo>{</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>k</mi> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>}</mo> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{k=1}^{n-1}\left\{{\frac {km}{n}}\right\}={\tfrac {1}{2}}(n-1).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c17f195f3b29782413f8a474b3a2402f57a88822" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:23.926ex; height:7.343ex;" alt="{\displaystyle \sum _{k=1}^{n-1}\left\{{\frac {km}{n}}\right\}={\tfrac {1}{2}}(n-1).}"></span></dd></dl> <p><br /> Since the right-hand side of the general case is symmetrical in <i>m</i> and <i>n</i>, this implies that </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor {\frac {m{\vphantom {1}}}{n}}\right\rfloor +\left\lfloor {\frac {2m}{n}}\right\rfloor +\dots +\left\lfloor {\frac {(n-1)m}{n}}\right\rfloor =\left\lfloor {\frac {n{\vphantom {1}}}{m}}\right\rfloor +\left\lfloor {\frac {2n}{m}}\right\rfloor +\dots +\left\lfloor {\frac {(m-1)n}{m}}\right\rfloor .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>m</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mi>m</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mi>n</mi> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>m</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mi>n</mi> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor {\frac {m{\vphantom {1}}}{n}}\right\rfloor +\left\lfloor {\frac {2m}{n}}\right\rfloor +\dots +\left\lfloor {\frac {(n-1)m}{n}}\right\rfloor =\left\lfloor {\frac {n{\vphantom {1}}}{m}}\right\rfloor +\left\lfloor {\frac {2n}{m}}\right\rfloor +\dots +\left\lfloor {\frac {(m-1)n}{m}}\right\rfloor .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/376d703a1a0ed59f1ab0b0f7ef2ba265ba23c5f2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:76.236ex; height:6.343ex;" alt="{\displaystyle \left\lfloor {\frac {m{\vphantom {1}}}{n}}\right\rfloor +\left\lfloor {\frac {2m}{n}}\right\rfloor +\dots +\left\lfloor {\frac {(n-1)m}{n}}\right\rfloor =\left\lfloor {\frac {n{\vphantom {1}}}{m}}\right\rfloor +\left\lfloor {\frac {2n}{m}}\right\rfloor +\dots +\left\lfloor {\frac {(m-1)n}{m}}\right\rfloor .}"></span></dd></dl> <p>More generally, if <i>m</i> and <i>n</i> are positive, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}&amp;\left\lfloor {\frac {x{\vphantom {1}}}{n}}\right\rfloor +\left\lfloor {\frac {m+x}{n}}\right\rfloor +\left\lfloor {\frac {2m+x}{n}}\right\rfloor +\dots +\left\lfloor {\frac {(n-1)m+x}{n}}\right\rfloor \\[5mu]=&amp;\left\lfloor {\frac {x{\vphantom {1}}}{m}}\right\rfloor +\left\lfloor {\frac {n+x}{m}}\right\rfloor +\left\lfloor {\frac {2n+x}{m}}\right\rfloor +\cdots +\left\lfloor {\frac {(m-1)n+x}{m}}\right\rfloor .\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.578em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd /> <mtd> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>m</mi> <mo>+</mo> <mi>x</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mi>m</mi> <mo>+</mo> <mi>x</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mi>m</mi> <mo>+</mo> <mi>x</mi> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> </mtd> <mtd> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mpadded width="0"> <mphantom> <mn>1</mn> </mphantom> </mpadded> </mrow> </mrow> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>+</mo> <mi>x</mi> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mi>n</mi> <mo>+</mo> <mi>x</mi> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>m</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mi>n</mi> <mo>+</mo> <mi>x</mi> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}&amp;\left\lfloor {\frac {x{\vphantom {1}}}{n}}\right\rfloor +\left\lfloor {\frac {m+x}{n}}\right\rfloor +\left\lfloor {\frac {2m+x}{n}}\right\rfloor +\dots +\left\lfloor {\frac {(n-1)m+x}{n}}\right\rfloor \\[5mu]=&amp;\left\lfloor {\frac {x{\vphantom {1}}}{m}}\right\rfloor +\left\lfloor {\frac {n+x}{m}}\right\rfloor +\left\lfloor {\frac {2n+x}{m}}\right\rfloor +\cdots +\left\lfloor {\frac {(m-1)n+x}{m}}\right\rfloor .\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3dbbd8db363654b80187d2b59fbc7e82d5291350" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.005ex; width:59.615ex; height:13.176ex;" alt="{\displaystyle {\begin{aligned}&amp;\left\lfloor {\frac {x{\vphantom {1}}}{n}}\right\rfloor +\left\lfloor {\frac {m+x}{n}}\right\rfloor +\left\lfloor {\frac {2m+x}{n}}\right\rfloor +\dots +\left\lfloor {\frac {(n-1)m+x}{n}}\right\rfloor \\[5mu]=&amp;\left\lfloor {\frac {x{\vphantom {1}}}{m}}\right\rfloor +\left\lfloor {\frac {n+x}{m}}\right\rfloor +\left\lfloor {\frac {2n+x}{m}}\right\rfloor +\cdots +\left\lfloor {\frac {(m-1)n+x}{m}}\right\rfloor .\end{aligned}}}"></span></dd></dl> <p>This is sometimes called a <a href="#Quadratic_reciprocity">reciprocity law</a>.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">&#91;</span>17<span class="cite-bracket">&#93;</span></a></sup> </p><p>Division by positive integers gives rise to an interesting and sometimes useful property. Assuming <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m,n&gt;0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>m</mi> <mo>,</mo> <mi>n</mi> <mo>&gt;</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle m,n&gt;0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e91082f201fdfd540ec8a582b019e1f876d58f00" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.73ex; height:2.509ex;" alt="{\displaystyle m,n&gt;0}"></span>, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m\leq \left\lfloor {\frac {x}{n}}\right\rfloor \iff n\leq \left\lfloor {\frac {x}{m}}\right\rfloor \iff n\leq {\frac {\lfloor x\rfloor }{m}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>m</mi> <mo>&#x2264;<!-- ≤ --></mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mspace width="thickmathspace" /> <mo stretchy="false">&#x27FA;<!-- ⟺ --></mo> <mspace width="thickmathspace" /> <mi>n</mi> <mo>&#x2264;<!-- ≤ --></mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mspace width="thickmathspace" /> <mo stretchy="false">&#x27FA;<!-- ⟺ --></mo> <mspace width="thickmathspace" /> <mi>n</mi> <mo>&#x2264;<!-- ≤ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle m\leq \left\lfloor {\frac {x}{n}}\right\rfloor \iff n\leq \left\lfloor {\frac {x}{m}}\right\rfloor \iff n\leq {\frac {\lfloor x\rfloor }{m}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a26a8e9fbfac89c012971d88c3f7f9998371e030" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:42.814ex; height:5.676ex;" alt="{\displaystyle m\leq \left\lfloor {\frac {x}{n}}\right\rfloor \iff n\leq \left\lfloor {\frac {x}{m}}\right\rfloor \iff n\leq {\frac {\lfloor x\rfloor }{m}}.}"></span></dd></dl> <p>Similarly, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m\geq \left\lceil {\frac {x}{n}}\right\rceil \iff n\geq \left\lceil {\frac {x}{m}}\right\rceil \iff n\geq {\frac {\lceil x\rceil }{m}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>m</mi> <mo>&#x2265;<!-- ≥ --></mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>n</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mspace width="thickmathspace" /> <mo stretchy="false">&#x27FA;<!-- ⟺ --></mo> <mspace width="thickmathspace" /> <mi>n</mi> <mo>&#x2265;<!-- ≥ --></mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>m</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mspace width="thickmathspace" /> <mo stretchy="false">&#x27FA;<!-- ⟺ --></mo> <mspace width="thickmathspace" /> <mi>n</mi> <mo>&#x2265;<!-- ≥ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mrow> <mi>m</mi> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle m\geq \left\lceil {\frac {x}{n}}\right\rceil \iff n\geq \left\lceil {\frac {x}{m}}\right\rceil \iff n\geq {\frac {\lceil x\rceil }{m}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/051a19fa9aae47af936bb8790a8e7aee435df2cc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:42.814ex; height:5.676ex;" alt="{\displaystyle m\geq \left\lceil {\frac {x}{n}}\right\rceil \iff n\geq \left\lceil {\frac {x}{m}}\right\rceil \iff n\geq {\frac {\lceil x\rceil }{m}}.}"></span></dd></dl> <p>Indeed, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m\leq \left\lfloor {\frac {x}{n}}\right\rfloor \implies m\leq {\frac {x}{n}}\implies n\leq {\frac {x}{m}}\implies n\leq \left\lfloor {\frac {x}{m}}\right\rfloor \implies \ldots \implies m\leq \left\lfloor {\frac {x}{n}}\right\rfloor ,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>m</mi> <mo>&#x2264;<!-- ≤ --></mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mspace width="thickmathspace" /> <mo stretchy="false">&#x27F9;<!-- ⟹ --></mo> <mspace width="thickmathspace" /> <mi>m</mi> <mo>&#x2264;<!-- ≤ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>n</mi> </mfrac> </mrow> <mspace width="thickmathspace" /> <mo stretchy="false">&#x27F9;<!-- ⟹ --></mo> <mspace width="thickmathspace" /> <mi>n</mi> <mo>&#x2264;<!-- ≤ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>m</mi> </mfrac> </mrow> <mspace width="thickmathspace" /> <mo stretchy="false">&#x27F9;<!-- ⟹ --></mo> <mspace width="thickmathspace" /> <mi>n</mi> <mo>&#x2264;<!-- ≤ --></mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>m</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mspace width="thickmathspace" /> <mo stretchy="false">&#x27F9;<!-- ⟹ --></mo> <mspace width="thickmathspace" /> <mo>&#x2026;<!-- … --></mo> <mspace width="thickmathspace" /> <mo stretchy="false">&#x27F9;<!-- ⟹ --></mo> <mspace width="thickmathspace" /> <mi>m</mi> <mo>&#x2264;<!-- ≤ --></mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle m\leq \left\lfloor {\frac {x}{n}}\right\rfloor \implies m\leq {\frac {x}{n}}\implies n\leq {\frac {x}{m}}\implies n\leq \left\lfloor {\frac {x}{m}}\right\rfloor \implies \ldots \implies m\leq \left\lfloor {\frac {x}{n}}\right\rfloor ,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b1b27d4f9b1c2b8ca85de3cba383d3923d3a089" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:79.902ex; height:4.843ex;" alt="{\displaystyle m\leq \left\lfloor {\frac {x}{n}}\right\rfloor \implies m\leq {\frac {x}{n}}\implies n\leq {\frac {x}{m}}\implies n\leq \left\lfloor {\frac {x}{m}}\right\rfloor \implies \ldots \implies m\leq \left\lfloor {\frac {x}{n}}\right\rfloor ,}"></span></dd></dl> <p>keeping in mind that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle \lfloor x/n\rfloor ={\bigl \lfloor }\lfloor x\rfloor /n{\bigr \rfloor }.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mi>n</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">&#x230A;</mo> </mrow> </mrow> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">&#x230B;</mo> </mrow> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\textstyle \lfloor x/n\rfloor ={\bigl \lfloor }\lfloor x\rfloor /n{\bigr \rfloor }.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/541b29e9a85c1f018688f7f3e4cfbcf5e6a61bd0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:17.843ex; height:3.176ex;" alt="{\textstyle \lfloor x/n\rfloor ={\bigl \lfloor }\lfloor x\rfloor /n{\bigr \rfloor }.}"></span> The second equivalence involving the ceiling function can be proved similarly. </p> <div class="mw-heading mw-heading3"><h3 id="Nested_divisions">Nested divisions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=7" title="Edit section: Nested divisions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For positive integer <i>n</i>, and arbitrary real numbers <i>m</i>,<i>x</i>:<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">&#91;</span>18<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor {\frac {\lfloor x/m\rfloor }{n}}\right\rfloor =\left\lfloor {\frac {x}{mn}}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mi>m</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mrow> <mi>m</mi> <mi>n</mi> </mrow> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor {\frac {\lfloor x/m\rfloor }{n}}\right\rfloor =\left\lfloor {\frac {x}{mn}}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c7c136286573bc4a5c8578fbee2f420a3fa6961a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:19.969ex; height:6.343ex;" alt="{\displaystyle \left\lfloor {\frac {\lfloor x/m\rfloor }{n}}\right\rfloor =\left\lfloor {\frac {x}{mn}}\right\rfloor }"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lceil {\frac {\lceil x/m\rceil }{n}}\right\rceil =\left\lceil {\frac {x}{mn}}\right\rceil .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mi>m</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mrow> <mi>n</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mrow> <mi>m</mi> <mi>n</mi> </mrow> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lceil {\frac {\lceil x/m\rceil }{n}}\right\rceil =\left\lceil {\frac {x}{mn}}\right\rceil .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f4c151cc2d107bd8d3fc327a0346003b7a001b8a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:21.003ex; height:6.343ex;" alt="{\displaystyle \left\lceil {\frac {\lceil x/m\rceil }{n}}\right\rceil =\left\lceil {\frac {x}{mn}}\right\rceil .}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Continuity_and_series_expansions">Continuity and series expansions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=8" title="Edit section: Continuity and series expansions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>None of the functions discussed in this article are <a href="/wiki/Continuous_function" title="Continuous function">continuous</a>, but all are <a href="/wiki/Piecewise_linear_function" title="Piecewise linear function">piecewise linear</a>: the functions <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/738c94c88678dd08a289f90a47a609ce44eedf14" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.394ex; height:2.843ex;" alt="{\displaystyle \lfloor x\rfloor }"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil x\rceil }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lceil x\rceil }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5ac7f37c8288700904b4a22a2f7c94d45ba917de" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.394ex; height:2.843ex;" alt="{\displaystyle \lceil x\rceil }"></span>, and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \{x\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \{x\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a120eeb8a091b516595765bd08b306f2394e7721" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.655ex; height:2.843ex;" alt="{\displaystyle \{x\}}"></span> have discontinuities at the integers. </p><p><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/738c94c88678dd08a289f90a47a609ce44eedf14" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.394ex; height:2.843ex;" alt="{\displaystyle \lfloor x\rfloor }"></span>&#160; is <a href="/wiki/Semi-continuity" title="Semi-continuity">upper semi-continuous</a> and &#160;<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lceil x\rceil }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lceil x\rceil }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5ac7f37c8288700904b4a22a2f7c94d45ba917de" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.394ex; height:2.843ex;" alt="{\displaystyle \lceil x\rceil }"></span>&#160; and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \{x\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \{x\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a120eeb8a091b516595765bd08b306f2394e7721" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.655ex; height:2.843ex;" alt="{\displaystyle \{x\}}"></span>&#160; are lower semi-continuous. </p><p>Since none of the functions discussed in this article are continuous, none of them have a <a href="/wiki/Power_series" title="Power series">power series</a> expansion. Since floor and ceiling are not periodic, they do not have uniformly convergent <a href="/wiki/Fourier_series" title="Fourier series">Fourier series</a> expansions. The fractional part function has Fourier series expansion<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">&#91;</span>19<span class="cite-bracket">&#93;</span></a></sup> <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \{x\}={\frac {1}{2}}-{\frac {1}{\pi }}\sum _{k=1}^{\infty }{\frac {\sin(2\pi kx)}{k}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>&#x03C0;<!-- π --></mi> </mfrac> </mrow> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>sin</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mo stretchy="false">(</mo> <mn>2</mn> <mi>&#x03C0;<!-- π --></mi> <mi>k</mi> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mi>k</mi> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \{x\}={\frac {1}{2}}-{\frac {1}{\pi }}\sum _{k=1}^{\infty }{\frac {\sin(2\pi kx)}{k}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dd89155da059ef7a160efd25228e3309f4a2c148" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:28.426ex; height:6.843ex;" alt="{\displaystyle \{x\}={\frac {1}{2}}-{\frac {1}{\pi }}\sum _{k=1}^{\infty }{\frac {\sin(2\pi kx)}{k}}}"></span> for <span class="texhtml mvar" style="font-style:italic;">x</span> not an integer. </p><p>At points of discontinuity, a Fourier series converges to a value that is the average of its limits on the left and the right, unlike the floor, ceiling and fractional part functions: for <i>y</i> fixed and <i>x</i> a multiple of <i>y</i> the Fourier series given converges to <i>y</i>/2, rather than to <i>x</i>&#160;mod&#160;<i>y</i>&#160;=&#160;0. At points of continuity the series converges to the true value. </p><p>Using the formula <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor =x-\{x\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>=</mo> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor =x-\{x\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e7cac1ebe04bd5cb5ba4fdca5d62915ef2a037ce" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.318ex; height:2.843ex;" alt="{\displaystyle \lfloor x\rfloor =x-\{x\}}"></span> gives <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rfloor =x-{\frac {1}{2}}+{\frac {1}{\pi }}\sum _{k=1}^{\infty }{\frac {\sin(2\pi kx)}{k}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>=</mo> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>&#x03C0;<!-- π --></mi> </mfrac> </mrow> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>sin</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mo stretchy="false">(</mo> <mn>2</mn> <mi>&#x03C0;<!-- π --></mi> <mi>k</mi> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mi>k</mi> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rfloor =x-{\frac {1}{2}}+{\frac {1}{\pi }}\sum _{k=1}^{\infty }{\frac {\sin(2\pi kx)}{k}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9282e7e0beb7c8f8c3c5778bb5c680ee8b4fd311" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:32.336ex; height:6.843ex;" alt="{\displaystyle \lfloor x\rfloor =x-{\frac {1}{2}}+{\frac {1}{\pi }}\sum _{k=1}^{\infty }{\frac {\sin(2\pi kx)}{k}}}"></span> for <span class="texhtml mvar" style="font-style:italic;">x</span> not an integer. </p> <div class="mw-heading mw-heading2"><h2 id="Applications">Applications</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=9" title="Edit section: Applications"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Mod_operator">Mod operator</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=10" title="Edit section: Mod operator"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For an integer <i>x</i> and a positive integer <i>y</i>, the <a href="/wiki/Modulo_operation" class="mw-redirect" title="Modulo operation">modulo operation</a>, denoted by <i>x</i> mod <i>y</i>, gives the value of the remainder when <i>x</i> is divided by <i>y</i>. This definition can be extended to real <i>x</i> and <i>y</i>, <i>y</i> ≠ 0, by the formula </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x{\bmod {y}}=x-y\left\lfloor {\frac {x}{y}}\right\rfloor .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo lspace="thickmathspace" rspace="thickmathspace">mod</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> </mrow> </mrow> <mo>=</mo> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mi>y</mi> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi>y</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x{\bmod {y}}=x-y\left\lfloor {\frac {x}{y}}\right\rfloor .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7e5f2c8648146554d84026f5ce5374309b486c52" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:22.888ex; height:6.176ex;" alt="{\displaystyle x{\bmod {y}}=x-y\left\lfloor {\frac {x}{y}}\right\rfloor .}"></span></dd></dl> <p>Then it follows from the definition of floor function that this extended operation satisfies many natural properties. Notably, <i>x</i> mod <i>y</i> is always between 0 and <i>y</i>, i.e., </p><p>if <i>y</i> is positive, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0\leq x{\bmod {y}}&lt;y,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> <mo>&#x2264;<!-- ≤ --></mo> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo lspace="thickmathspace" rspace="thickmathspace">mod</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> </mrow> </mrow> <mo>&lt;</mo> <mi>y</mi> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0\leq x{\bmod {y}}&lt;y,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/271fe4db75d139155d22ffd137f10ddd158c995c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:17.328ex; height:2.509ex;" alt="{\displaystyle 0\leq x{\bmod {y}}&lt;y,}"></span></dd></dl> <p>and if <i>y</i> is negative, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0\geq x{\bmod {y}}&gt;y.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> <mo>&#x2265;<!-- ≥ --></mo> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo lspace="thickmathspace" rspace="thickmathspace">mod</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> </mrow> </mrow> <mo>&gt;</mo> <mi>y</mi> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0\geq x{\bmod {y}}&gt;y.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/74344b7f10acd75d014471a0624651f03829fb21" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:17.328ex; height:2.509ex;" alt="{\displaystyle 0\geq x{\bmod {y}}&gt;y.}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Quadratic_reciprocity">Quadratic reciprocity</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=11" title="Edit section: Quadratic reciprocity"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Gauss's third proof of <a href="/wiki/Quadratic_reciprocity" title="Quadratic reciprocity">quadratic reciprocity</a>, as modified by Eisenstein, has two basic steps.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">&#91;</span>20<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">&#91;</span>21<span class="cite-bracket">&#93;</span></a></sup> </p><p>Let <i>p</i> and <i>q</i> be distinct positive odd prime numbers, and let <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m={\tfrac {1}{2}}(p-1),}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>m</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo stretchy="false">(</mo> <mi>p</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle m={\tfrac {1}{2}}(p-1),}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ef40a851904f63fb1943c3e9435b80cf0cd704bc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:14.425ex; height:3.509ex;" alt="{\displaystyle m={\tfrac {1}{2}}(p-1),}"></span> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n={\tfrac {1}{2}}(q-1).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo stretchy="false">(</mo> <mi>q</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n={\tfrac {1}{2}}(q-1).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cdfa2931d5af706a27f990afe88e57bf6904590a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:13.68ex; height:3.509ex;" alt="{\displaystyle n={\tfrac {1}{2}}(q-1).}"></span> </p><p>First, <a href="/wiki/Gauss%27s_lemma_(number_theory)" title="Gauss&#39;s lemma (number theory)">Gauss's lemma</a> is used to show that the <a href="/wiki/Legendre_symbol" title="Legendre symbol">Legendre symbols</a> are given by </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\left({\frac {q}{p}}\right)&amp;=(-1)^{\left\lfloor {\frac {q}{p}}\right\rfloor +\left\lfloor {\frac {2q}{p}}\right\rfloor +\dots +\left\lfloor {\frac {mq}{p}}\right\rfloor },\\[5mu]\left({\frac {p}{q}}\right)&amp;=(-1)^{\left\lfloor {\frac {p}{q}}\right\rfloor +\left\lfloor {\frac {2p}{q}}\right\rfloor +\dots +\left\lfloor {\frac {np}{q}}\right\rfloor }.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.578em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>q</mi> <mi>p</mi> </mfrac> </mrow> <mo>)</mo> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo stretchy="false">(</mo> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>q</mi> <mi>p</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mi>q</mi> </mrow> <mi>p</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>m</mi> <mi>q</mi> </mrow> <mi>p</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> </mrow> </msup> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>p</mi> <mi>q</mi> </mfrac> </mrow> <mo>)</mo> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo stretchy="false">(</mo> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>p</mi> <mi>q</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mi>p</mi> </mrow> <mi>q</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mi>p</mi> </mrow> <mi>q</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> </mrow> </msup> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\left({\frac {q}{p}}\right)&amp;=(-1)^{\left\lfloor {\frac {q}{p}}\right\rfloor +\left\lfloor {\frac {2q}{p}}\right\rfloor +\dots +\left\lfloor {\frac {mq}{p}}\right\rfloor },\\[5mu]\left({\frac {p}{q}}\right)&amp;=(-1)^{\left\lfloor {\frac {p}{q}}\right\rfloor +\left\lfloor {\frac {2p}{q}}\right\rfloor +\dots +\left\lfloor {\frac {np}{q}}\right\rfloor }.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b0ef8e9e25f4bb73b3c8d935ec673b29c50bf548" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.005ex; width:32.151ex; height:13.009ex;" alt="{\displaystyle {\begin{aligned}\left({\frac {q}{p}}\right)&amp;=(-1)^{\left\lfloor {\frac {q}{p}}\right\rfloor +\left\lfloor {\frac {2q}{p}}\right\rfloor +\dots +\left\lfloor {\frac {mq}{p}}\right\rfloor },\\[5mu]\left({\frac {p}{q}}\right)&amp;=(-1)^{\left\lfloor {\frac {p}{q}}\right\rfloor +\left\lfloor {\frac {2p}{q}}\right\rfloor +\dots +\left\lfloor {\frac {np}{q}}\right\rfloor }.\end{aligned}}}"></span></dd></dl> <p>The second step is to use a <a href="/wiki/Geometric_series" title="Geometric series">geometric</a> argument to show that </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor {\frac {q}{p}}\right\rfloor +\left\lfloor {\frac {2q}{p}}\right\rfloor +\dots +\left\lfloor {\frac {mq}{p}}\right\rfloor +\left\lfloor {\frac {p}{q}}\right\rfloor +\left\lfloor {\frac {2p}{q}}\right\rfloor +\dots +\left\lfloor {\frac {np}{q}}\right\rfloor =mn.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>q</mi> <mi>p</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mi>q</mi> </mrow> <mi>p</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>m</mi> <mi>q</mi> </mrow> <mi>p</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>p</mi> <mi>q</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mn>2</mn> <mi>p</mi> </mrow> <mi>q</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mi>p</mi> </mrow> <mi>q</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mi>m</mi> <mi>n</mi> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor {\frac {q}{p}}\right\rfloor +\left\lfloor {\frac {2q}{p}}\right\rfloor +\dots +\left\lfloor {\frac {mq}{p}}\right\rfloor +\left\lfloor {\frac {p}{q}}\right\rfloor +\left\lfloor {\frac {2p}{q}}\right\rfloor +\dots +\left\lfloor {\frac {np}{q}}\right\rfloor =mn.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ed674b9dfa93cc24ed95292189a8d0b4932e3776" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:66.366ex; height:6.176ex;" alt="{\displaystyle \left\lfloor {\frac {q}{p}}\right\rfloor +\left\lfloor {\frac {2q}{p}}\right\rfloor +\dots +\left\lfloor {\frac {mq}{p}}\right\rfloor +\left\lfloor {\frac {p}{q}}\right\rfloor +\left\lfloor {\frac {2p}{q}}\right\rfloor +\dots +\left\lfloor {\frac {np}{q}}\right\rfloor =mn.}"></span></dd></dl> <p>Combining these formulas gives quadratic reciprocity in the form </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left({\frac {p}{q}}\right)\left({\frac {q}{p}}\right)=(-1)^{mn}=(-1)^{{\frac {p-1}{2}}{\frac {q-1}{2}}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>p</mi> <mi>q</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>q</mi> <mi>p</mi> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mo stretchy="false">(</mo> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>n</mi> </mrow> </msup> <mo>=</mo> <mo stretchy="false">(</mo> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>p</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mn>2</mn> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>q</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mn>2</mn> </mfrac> </mrow> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left({\frac {p}{q}}\right)\left({\frac {q}{p}}\right)=(-1)^{mn}=(-1)^{{\frac {p-1}{2}}{\frac {q-1}{2}}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/107230eddab9380f27bd1fc2b6871f1c300efbf2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:36.906ex; height:6.176ex;" alt="{\displaystyle \left({\frac {p}{q}}\right)\left({\frac {q}{p}}\right)=(-1)^{mn}=(-1)^{{\frac {p-1}{2}}{\frac {q-1}{2}}}.}"></span></dd></dl> <p>There are formulas that use floor to express the quadratic character of small numbers mod odd primes <i>p</i>:<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">&#91;</span>22<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\left({\frac {2}{p}}\right)&amp;=(-1)^{\left\lfloor {\frac {p+1}{4}}\right\rfloor },\\[5mu]\left({\frac {3}{p}}\right)&amp;=(-1)^{\left\lfloor {\frac {p+1}{6}}\right\rfloor }.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.578em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>2</mn> <mi>p</mi> </mfrac> </mrow> <mo>)</mo> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo stretchy="false">(</mo> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>p</mi> <mo>+</mo> <mn>1</mn> </mrow> <mn>4</mn> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> </mrow> </msup> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>3</mn> <mi>p</mi> </mfrac> </mrow> <mo>)</mo> </mrow> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo stretchy="false">(</mo> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>p</mi> <mo>+</mo> <mn>1</mn> </mrow> <mn>6</mn> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> </mrow> </msup> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\left({\frac {2}{p}}\right)&amp;=(-1)^{\left\lfloor {\frac {p+1}{4}}\right\rfloor },\\[5mu]\left({\frac {3}{p}}\right)&amp;=(-1)^{\left\lfloor {\frac {p+1}{6}}\right\rfloor }.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d5895c01c9ac887cbbea1493c4023f5362fbf1b4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.005ex; width:19.884ex; height:13.009ex;" alt="{\displaystyle {\begin{aligned}\left({\frac {2}{p}}\right)&amp;=(-1)^{\left\lfloor {\frac {p+1}{4}}\right\rfloor },\\[5mu]\left({\frac {3}{p}}\right)&amp;=(-1)^{\left\lfloor {\frac {p+1}{6}}\right\rfloor }.\end{aligned}}}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Rounding">Rounding</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=12" title="Edit section: Rounding"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For an arbitrary real number <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span>, <a href="/wiki/Rounding" title="Rounding">rounding</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span> to the nearest integer with <a href="/wiki/Rounding#Tie-breaking" title="Rounding">tie breaking</a> towards positive infinity is given by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\text{rpi}}(x)=\left\lfloor x+{\tfrac {1}{2}}\right\rfloor =\left\lceil {\tfrac {1}{2}}\lfloor 2x\rfloor \right\rceil }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext>rpi</mtext> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow> <mi>x</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mn>2</mn> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mrow> <mo>&#x2309;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{rpi}}(x)=\left\lfloor x+{\tfrac {1}{2}}\right\rfloor =\left\lceil {\tfrac {1}{2}}\lfloor 2x\rfloor \right\rceil }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bac489c012d709086135e2f0c0fe3b170d4e3184" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:28.62ex; height:3.509ex;" alt="{\displaystyle {\text{rpi}}(x)=\left\lfloor x+{\tfrac {1}{2}}\right\rfloor =\left\lceil {\tfrac {1}{2}}\lfloor 2x\rfloor \right\rceil }"></span>; rounding towards negative infinity is given as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\text{rni}}(x)=\left\lceil x-{\tfrac {1}{2}}\right\rceil =\left\lfloor {\tfrac {1}{2}}\lceil 2x\rceil \right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext>rni</mtext> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow> <mo>&#x2308;</mo> <mrow> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </mrow> <mo>&#x2309;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <mn>2</mn> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> </mrow> <mo>&#x230B;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{rni}}(x)=\left\lceil x-{\tfrac {1}{2}}\right\rceil =\left\lfloor {\tfrac {1}{2}}\lceil 2x\rceil \right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/892225d529c1bf6dc0071679c4493d1a6f5cd308" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:28.62ex; height:3.509ex;" alt="{\displaystyle {\text{rni}}(x)=\left\lceil x-{\tfrac {1}{2}}\right\rceil =\left\lfloor {\tfrac {1}{2}}\lceil 2x\rceil \right\rfloor }"></span>. </p><p>If tie-breaking is away from 0, then the rounding function is <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\text{ri}}(x)=\operatorname {sgn}(x)\left\lfloor |x|+{\tfrac {1}{2}}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext>ri</mtext> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>sgn</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mrow> <mo>&#x230A;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{ri}}(x)=\operatorname {sgn}(x)\left\lfloor |x|+{\tfrac {1}{2}}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/609b85810cdfed3da574e358bb041ca95bf03a16" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:24.01ex; height:3.509ex;" alt="{\displaystyle {\text{ri}}(x)=\operatorname {sgn}(x)\left\lfloor |x|+{\tfrac {1}{2}}\right\rfloor }"></span> (see <a href="/wiki/Sign_function" title="Sign function">sign function</a>), and <a href="/wiki/Rounding#Rounding_half_to_even" title="Rounding">rounding towards even</a> can be expressed with the more cumbersome <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor x\rceil =\left\lfloor x+{\tfrac {1}{2}}\right\rfloor +{\bigl \lceil }{\tfrac {1}{4}}(2x-1){\bigr \rceil }-{\bigl \lfloor }{\tfrac {1}{4}}(2x-1){\bigr \rfloor }-1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow> <mi>x</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">&#x2308;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>4</mn> </mfrac> </mstyle> </mrow> <mo stretchy="false">(</mo> <mn>2</mn> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">&#x2309;</mo> </mrow> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>4</mn> </mfrac> </mstyle> </mrow> <mo stretchy="false">(</mo> <mn>2</mn> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">&#x230B;</mo> </mrow> </mrow> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor x\rceil =\left\lfloor x+{\tfrac {1}{2}}\right\rfloor +{\bigl \lceil }{\tfrac {1}{4}}(2x-1){\bigr \rceil }-{\bigl \lfloor }{\tfrac {1}{4}}(2x-1){\bigr \rfloor }-1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a21bc0b100702b0302945499f51f71a6c86a48d4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:48.514ex; height:3.509ex;" alt="{\displaystyle \lfloor x\rceil =\left\lfloor x+{\tfrac {1}{2}}\right\rfloor +{\bigl \lceil }{\tfrac {1}{4}}(2x-1){\bigr \rceil }-{\bigl \lfloor }{\tfrac {1}{4}}(2x-1){\bigr \rfloor }-1}"></span>, which is the above expression for rounding towards positive infinity <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\text{rpi}}(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext>rpi</mtext> </mrow> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{rpi}}(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2ad34109cad063f9b99b9b653dc0c44a0c9d612a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.99ex; height:2.843ex;" alt="{\displaystyle {\text{rpi}}(x)}"></span> minus an <a href="/wiki/Integer" title="Integer">integrality</a> <a href="/wiki/Indicator_function" title="Indicator function">indicator</a> for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\tfrac {1}{4}}(2x-1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>4</mn> </mfrac> </mstyle> </mrow> <mo stretchy="false">(</mo> <mn>2</mn> <mi>x</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\tfrac {1}{4}}(2x-1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ecb581e051cfe4bf2cafc8e6cc60897ab19fe6a9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:9.962ex; height:3.509ex;" alt="{\displaystyle {\tfrac {1}{4}}(2x-1)}"></span>. </p><p>Rounding a <a href="/wiki/Real_number" title="Real number">real number</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span> to the nearest integer value forms a very basic type of <a href="/wiki/Quantization_(signal_processing)" title="Quantization (signal processing)">quantizer</a> – a <i>uniform</i> one. A typical (<i>mid-tread</i>) uniform quantizer with a quantization <i>step size</i> equal to some value <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Delta }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">&#x0394;<!-- Δ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Delta }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/32769037c408874e1890f77554c65f39c523ebe2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.936ex; height:2.176ex;" alt="{\displaystyle \Delta }"></span> can be expressed as </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q(x)=\Delta \cdot \left\lfloor {\frac {x}{\Delta }}+{\frac {1}{2}}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Q</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi mathvariant="normal">&#x0394;<!-- Δ --></mi> <mo>&#x22C5;<!-- ⋅ --></mo> <mrow> <mo>&#x230A;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>x</mi> <mi mathvariant="normal">&#x0394;<!-- Δ --></mi> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Q(x)=\Delta \cdot \left\lfloor {\frac {x}{\Delta }}+{\frac {1}{2}}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/953f2b96d64a62e07c90e47cff07b22cfe2cdd85" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:22.012ex; height:6.176ex;" alt="{\displaystyle Q(x)=\Delta \cdot \left\lfloor {\frac {x}{\Delta }}+{\frac {1}{2}}\right\rfloor }"></span>,</dd></dl> <div class="mw-heading mw-heading3"><h3 id="Number_of_digits">Number of digits</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=13" title="Edit section: Number of digits"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The number of digits in <a href="/wiki/Base_(exponentiation)" title="Base (exponentiation)">base</a> <i>b</i> of a positive integer <i>k</i> is </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lfloor \log _{b}{k}\rfloor +1=\lceil \log _{b}{(k+1)}\rceil .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <msub> <mi>log</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msub> <mo>&#x2061;<!-- ⁡ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>+</mo> <mn>1</mn> <mo>=</mo> <mo fence="false" stretchy="false">&#x2308;<!-- ⌈ --></mo> <msub> <mi>log</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msub> <mo>&#x2061;<!-- ⁡ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mo fence="false" stretchy="false">&#x2309;<!-- ⌉ --></mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lfloor \log _{b}{k}\rfloor +1=\lceil \log _{b}{(k+1)}\rceil .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c04153fd0872fd5f7ef33c1e2bdb022ce55d8629" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:28.705ex; height:2.843ex;" alt="{\displaystyle \lfloor \log _{b}{k}\rfloor +1=\lceil \log _{b}{(k+1)}\rceil .}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Number_of_strings_without_repeated_characters">Number of strings without repeated characters</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=14" title="Edit section: Number of strings without repeated characters"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The number of possible <a href="/wiki/String_(computer_science)" title="String (computer science)">strings</a> of arbitrary length that doesn't use any character twice is given by<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">&#91;</span>23<span class="cite-bracket">&#93;</span></a></sup><sup class="noprint Inline-Template noprint noexcerpt Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:NOTRS" class="mw-redirect" title="Wikipedia:NOTRS"><span title="This claim needs references to better sources. (February 2022)">better&#160;source&#160;needed</span></a></i>&#93;</sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (n)_{0}+\cdots +(n)_{n}=\lfloor en!\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>n</mi> <msub> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>+</mo> <mo stretchy="false">(</mo> <mi>n</mi> <msub> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>e</mi> <mi>n</mi> <mo>!</mo> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (n)_{0}+\cdots +(n)_{n}=\lfloor en!\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c5ad7b4d906ffa5fee9e56da04fdd6d410563df6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:25.373ex; height:2.843ex;" alt="{\displaystyle (n)_{0}+\cdots +(n)_{n}=\lfloor en!\rfloor }"></span></dd></dl> <p>where: </p> <ul><li><span class="texhtml"><i>n</i></span> &gt; 0 is the number of letters in the alphabet (e.g., 26 in <a href="/wiki/English_language" title="English language">English</a>)</li> <li>the <a href="/wiki/Falling_factorial" class="mw-redirect" title="Falling factorial">falling factorial</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (n)_{k}=n(n-1)\cdots (n-k+1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>n</mi> <msub> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mi>n</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (n)_{k}=n(n-1)\cdots (n-k+1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/123abeef2bb66891b1a1655d4f849c00cc35881d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:30.749ex; height:2.843ex;" alt="{\displaystyle (n)_{k}=n(n-1)\cdots (n-k+1)}"></span> denotes the number of strings of length <span class="texhtml"><i>k</i></span> that don't use any character twice.</li> <li><span class="texhtml"><i>n</i></span>! denotes the <a href="/wiki/Factorial" title="Factorial">factorial</a> of <span class="texhtml"><i>n</i></span></li> <li><span class="texhtml"><i>e</i></span> = 2.718... is <a href="/wiki/Euler%27s_number" class="mw-redirect" title="Euler&#39;s number">Euler's number</a></li></ul> <p>For <span class="texhtml"><i>n</i></span> = 26, this comes out to 1096259850353149530222034277. </p> <div class="mw-heading mw-heading3"><h3 id="Factors_of_factorials">Factors of factorials</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=15" title="Edit section: Factors of factorials"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Let <i>n</i> be a positive integer and <i>p</i> a positive prime number. The exponent of the highest power of <i>p</i> that divides <i>n</i>! is given by a version of <a href="/wiki/Legendre%27s_formula" title="Legendre&#39;s formula">Legendre's formula</a><sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">&#91;</span>24<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor {\frac {n}{p}}\right\rfloor +\left\lfloor {\frac {n}{p^{2}}}\right\rfloor +\left\lfloor {\frac {n}{p^{3}}}\right\rfloor +\dots ={\frac {n-\sum _{k}a_{k}}{p-1}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>n</mi> <mi>p</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>n</mi> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>n</mi> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msup> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <munder> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munder> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mrow> <mrow> <mi>p</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor {\frac {n}{p}}\right\rfloor +\left\lfloor {\frac {n}{p^{2}}}\right\rfloor +\left\lfloor {\frac {n}{p^{3}}}\right\rfloor +\dots ={\frac {n-\sum _{k}a_{k}}{p-1}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b87a3632c0dc79d785069d10a6a1668a7fdd3eb0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:42.144ex; height:6.343ex;" alt="{\displaystyle \left\lfloor {\frac {n}{p}}\right\rfloor +\left\lfloor {\frac {n}{p^{2}}}\right\rfloor +\left\lfloor {\frac {n}{p^{3}}}\right\rfloor +\dots ={\frac {n-\sum _{k}a_{k}}{p-1}}}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle n=\sum _{k}a_{k}p^{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mi>n</mi> <mo>=</mo> <munder> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </munder> <msub> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <msup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\textstyle n=\sum _{k}a_{k}p^{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8c440cd7a7b92bdfd46eacfac7a46fa37cff2f37" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:13ex; height:3.176ex;" alt="{\textstyle n=\sum _{k}a_{k}p^{k}}"></span> is the way of writing <i>n</i> in base <i>p</i>. This is a finite sum, since the floors are zero when <i>p</i><sup><i>k</i></sup> &gt; <i>n</i>. </p> <div class="mw-heading mw-heading3"><h3 id="Beatty_sequence">Beatty sequence</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=16" title="Edit section: Beatty sequence"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <a href="/wiki/Beatty_sequence" title="Beatty sequence">Beatty sequence</a> shows how every positive <a href="/wiki/Irrational_number" title="Irrational number">irrational number</a> gives rise to a partition of the <a href="/wiki/Natural_number" title="Natural number">natural numbers</a> into two sequences via the floor function.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">&#91;</span>25<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Euler's_constant_(γ)"><span id="Euler.27s_constant_.28.CE.B3.29"></span>Euler's constant (γ)</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=17" title="Edit section: Euler&#039;s constant (γ)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are formulas for <a href="/wiki/Euler%E2%80%93Mascheroni_constant" class="mw-redirect" title="Euler–Mascheroni constant">Euler's constant</a> γ = 0.57721 56649 ... that involve the floor and ceiling, e.g.<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">&#91;</span>26<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \gamma =\int _{1}^{\infty }\left({1 \over \lfloor x\rfloor }-{1 \over x}\right)\,dx,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03B3;<!-- γ --></mi> <mo>=</mo> <msubsup> <mo>&#x222B;<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </msubsup> <mrow> <mo>(</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mi>x</mi> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mrow> </mfrac> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>x</mi> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mspace width="thinmathspace" /> <mi>d</mi> <mi>x</mi> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \gamma =\int _{1}^{\infty }\left({1 \over \lfloor x\rfloor }-{1 \over x}\right)\,dx,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/28b976a0c89b2f2bb1ee8e31c4b0c2f3c56d5d4b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:25.712ex; height:6.343ex;" alt="{\displaystyle \gamma =\int _{1}^{\infty }\left({1 \over \lfloor x\rfloor }-{1 \over x}\right)\,dx,}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \gamma =\lim _{n\to \infty }{\frac {1}{n}}\sum _{k=1}^{n}\left(\left\lceil {\frac {n}{k}}\right\rceil -{\frac {n}{k}}\right),}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03B3;<!-- γ --></mi> <mo>=</mo> <munder> <mo movablelimits="true" form="prefix">lim</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo stretchy="false">&#x2192;<!-- → --></mo> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </munder> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>n</mi> </mfrac> </mrow> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <mrow> <mo>(</mo> <mrow> <mrow> <mo>&#x2308;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>n</mi> <mi>k</mi> </mfrac> </mrow> <mo>&#x2309;</mo> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>n</mi> <mi>k</mi> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \gamma =\lim _{n\to \infty }{\frac {1}{n}}\sum _{k=1}^{n}\left(\left\lceil {\frac {n}{k}}\right\rceil -{\frac {n}{k}}\right),}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ab1590692a04f6ce3166de450ea4133da8db2310" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:28.947ex; height:6.843ex;" alt="{\displaystyle \gamma =\lim _{n\to \infty }{\frac {1}{n}}\sum _{k=1}^{n}\left(\left\lceil {\frac {n}{k}}\right\rceil -{\frac {n}{k}}\right),}"></span></dd></dl> <p>and </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \gamma =\sum _{k=2}^{\infty }(-1)^{k}{\frac {\left\lfloor \log _{2}k\right\rfloor }{k}}={\tfrac {1}{2}}-{\tfrac {1}{3}}+2\left({\tfrac {1}{4}}-{\tfrac {1}{5}}+{\tfrac {1}{6}}-{\tfrac {1}{7}}\right)+3\left({\tfrac {1}{8}}-\cdots -{\tfrac {1}{15}}\right)+\cdots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03B3;<!-- γ --></mi> <mo>=</mo> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </munderover> <mo stretchy="false">(</mo> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo>&#x230A;</mo> <mrow> <msub> <mi>log</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>&#x2061;<!-- ⁡ --></mo> <mi>k</mi> </mrow> <mo>&#x230B;</mo> </mrow> <mi>k</mi> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>3</mn> </mfrac> </mstyle> </mrow> <mo>+</mo> <mn>2</mn> <mrow> <mo>(</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>4</mn> </mfrac> </mstyle> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>5</mn> </mfrac> </mstyle> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>6</mn> </mfrac> </mstyle> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>7</mn> </mfrac> </mstyle> </mrow> </mrow> <mo>)</mo> </mrow> <mo>+</mo> <mn>3</mn> <mrow> <mo>(</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>8</mn> </mfrac> </mstyle> </mrow> <mo>&#x2212;<!-- − --></mo> <mo>&#x22EF;<!-- ⋯ --></mo> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>15</mn> </mfrac> </mstyle> </mrow> </mrow> <mo>)</mo> </mrow> <mo>+</mo> <mo>&#x22EF;<!-- ⋯ --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \gamma =\sum _{k=2}^{\infty }(-1)^{k}{\frac {\left\lfloor \log _{2}k\right\rfloor }{k}}={\tfrac {1}{2}}-{\tfrac {1}{3}}+2\left({\tfrac {1}{4}}-{\tfrac {1}{5}}+{\tfrac {1}{6}}-{\tfrac {1}{7}}\right)+3\left({\tfrac {1}{8}}-\cdots -{\tfrac {1}{15}}\right)+\cdots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b7238875984b2f4b26c07579871ea694d03437bc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:78.955ex; height:6.843ex;" alt="{\displaystyle \gamma =\sum _{k=2}^{\infty }(-1)^{k}{\frac {\left\lfloor \log _{2}k\right\rfloor }{k}}={\tfrac {1}{2}}-{\tfrac {1}{3}}+2\left({\tfrac {1}{4}}-{\tfrac {1}{5}}+{\tfrac {1}{6}}-{\tfrac {1}{7}}\right)+3\left({\tfrac {1}{8}}-\cdots -{\tfrac {1}{15}}\right)+\cdots }"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Riemann_zeta_function_(ζ)"><span id="Riemann_zeta_function_.28.CE.B6.29"></span>Riemann zeta function (ζ)</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=18" title="Edit section: Riemann zeta function (ζ)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The fractional part function also shows up in integral representations of the <a href="/wiki/Riemann_zeta_function" title="Riemann zeta function">Riemann zeta function</a>. It is straightforward to prove (using integration by parts)<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">&#91;</span>27<span class="cite-bracket">&#93;</span></a></sup> that if <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi (x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03C6;<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varphi (x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4c4046f1f2de7df04bde418ba2bc4d3898ac2385" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.659ex; height:2.843ex;" alt="{\displaystyle \varphi (x)}"></span> is any function with a continuous derivative in the closed interval [<i>a</i>, <i>b</i>], </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{a&lt;n\leq b}\varphi (n)=\int _{a}^{b}\varphi (x)\,dx+\int _{a}^{b}\left(\{x\}-{\tfrac {1}{2}}\right)\varphi '(x)\,dx+\left(\{a\}-{\tfrac {1}{2}}\right)\varphi (a)-\left(\{b\}-{\tfrac {1}{2}}\right)\varphi (b).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munder> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>a</mi> <mo>&lt;</mo> <mi>n</mi> <mo>&#x2264;<!-- ≤ --></mo> <mi>b</mi> </mrow> </munder> <mi>&#x03C6;<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msubsup> <mo>&#x222B;<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>a</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msubsup> <mi>&#x03C6;<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mi>d</mi> <mi>x</mi> <mo>+</mo> <msubsup> <mo>&#x222B;<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>a</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msubsup> <mrow> <mo>(</mo> <mrow> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </mrow> <mo>)</mo> </mrow> <msup> <mi>&#x03C6;<!-- φ --></mi> <mo>&#x2032;</mo> </msup> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mi>d</mi> <mi>x</mi> <mo>+</mo> <mrow> <mo>(</mo> <mrow> <mo fence="false" stretchy="false">{</mo> <mi>a</mi> <mo fence="false" stretchy="false">}</mo> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </mrow> <mo>)</mo> </mrow> <mi>&#x03C6;<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>a</mi> <mo stretchy="false">)</mo> <mo>&#x2212;<!-- − --></mo> <mrow> <mo>(</mo> <mrow> <mo fence="false" stretchy="false">{</mo> <mi>b</mi> <mo fence="false" stretchy="false">}</mo> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </mrow> <mo>)</mo> </mrow> <mi>&#x03C6;<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>b</mi> <mo stretchy="false">)</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{a&lt;n\leq b}\varphi (n)=\int _{a}^{b}\varphi (x)\,dx+\int _{a}^{b}\left(\{x\}-{\tfrac {1}{2}}\right)\varphi '(x)\,dx+\left(\{a\}-{\tfrac {1}{2}}\right)\varphi (a)-\left(\{b\}-{\tfrac {1}{2}}\right)\varphi (b).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/69ca784bc12e8bfeb5f437fe7198dd06852d5872" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.338ex; width:86.406ex; height:7.343ex;" alt="{\displaystyle \sum _{a&lt;n\leq b}\varphi (n)=\int _{a}^{b}\varphi (x)\,dx+\int _{a}^{b}\left(\{x\}-{\tfrac {1}{2}}\right)\varphi &#039;(x)\,dx+\left(\{a\}-{\tfrac {1}{2}}\right)\varphi (a)-\left(\{b\}-{\tfrac {1}{2}}\right)\varphi (b).}"></span></dd></dl> <p>Letting <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi (n)=n^{-s}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03C6;<!-- φ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mi>s</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varphi (n)=n^{-s}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/978c465b5d4ffbbe494562f1c6516a1d17d95109" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.499ex; height:3.009ex;" alt="{\displaystyle \varphi (n)=n^{-s}}"></span> for <a href="/wiki/Real_part" class="mw-redirect" title="Real part">real part</a> of <i>s</i> greater than 1 and letting <i>a</i> and <i>b</i> be integers, and letting <i>b</i> approach infinity gives </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \zeta (s)=s\int _{1}^{\infty }{\frac {{\frac {1}{2}}-\{x\}}{x^{s+1}}}\,dx+{\frac {1}{s-1}}+{\frac {1}{2}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03B6;<!-- ζ --></mi> <mo stretchy="false">(</mo> <mi>s</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>s</mi> <msubsup> <mo>&#x222B;<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </msubsup> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> <mo>&#x2212;<!-- − --></mo> <mo fence="false" stretchy="false">{</mo> <mi>x</mi> <mo fence="false" stretchy="false">}</mo> </mrow> <msup> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>s</mi> <mo>+</mo> <mn>1</mn> </mrow> </msup> </mfrac> </mrow> <mspace width="thinmathspace" /> <mi>d</mi> <mi>x</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mi>s</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \zeta (s)=s\int _{1}^{\infty }{\frac {{\frac {1}{2}}-\{x\}}{x^{s+1}}}\,dx+{\frac {1}{s-1}}+{\frac {1}{2}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/50e117e1c7d2bf6668a6b3c683993013dbcadfcc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:39.475ex; height:6.843ex;" alt="{\displaystyle \zeta (s)=s\int _{1}^{\infty }{\frac {{\frac {1}{2}}-\{x\}}{x^{s+1}}}\,dx+{\frac {1}{s-1}}+{\frac {1}{2}}.}"></span></dd></dl> <p>This formula is valid for all <i>s</i> with real part greater than &#8722;1, (except <i>s</i> = 1, where there is a pole) and combined with the Fourier expansion for {<i>x</i>} can be used to extend the zeta function to the entire complex plane and to prove its functional equation.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">&#91;</span>28<span class="cite-bracket">&#93;</span></a></sup> </p><p>For <i>s</i> = <i>σ</i> + <i>it</i> in the critical strip 0 &lt; <i>σ</i> &lt; 1, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \zeta (s)=s\int _{-\infty }^{\infty }e^{-\sigma \omega }(\lfloor e^{\omega }\rfloor -e^{\omega })e^{-it\omega }\,d\omega .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03B6;<!-- ζ --></mi> <mo stretchy="false">(</mo> <mi>s</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>s</mi> <msubsup> <mo>&#x222B;<!-- ∫ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </msubsup> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mi>&#x03C3;<!-- σ --></mi> <mi>&#x03C9;<!-- ω --></mi> </mrow> </msup> <mo stretchy="false">(</mo> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>&#x03C9;<!-- ω --></mi> </mrow> </msup> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> <mo>&#x2212;<!-- − --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>&#x03C9;<!-- ω --></mi> </mrow> </msup> <mo stretchy="false">)</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <mi>i</mi> <mi>t</mi> <mi>&#x03C9;<!-- ω --></mi> </mrow> </msup> <mspace width="thinmathspace" /> <mi>d</mi> <mi>&#x03C9;<!-- ω --></mi> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \zeta (s)=s\int _{-\infty }^{\infty }e^{-\sigma \omega }(\lfloor e^{\omega }\rfloor -e^{\omega })e^{-it\omega }\,d\omega .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2a4ed15fe32dcfe3bf98a55bcf6fbf023099162e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:37.825ex; height:6.009ex;" alt="{\displaystyle \zeta (s)=s\int _{-\infty }^{\infty }e^{-\sigma \omega }(\lfloor e^{\omega }\rfloor -e^{\omega })e^{-it\omega }\,d\omega .}"></span></dd></dl> <p>In 1947 <a href="/wiki/Balthasar_van_der_Pol" title="Balthasar van der Pol">van der Pol</a> used this representation to construct an analogue computer for finding roots of the zeta function.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">&#91;</span>29<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Formulas_for_prime_numbers">Formulas for prime numbers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=19" title="Edit section: Formulas for prime numbers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The floor function appears in several formulas characterizing prime numbers. For example, since <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle {\bigl \lfloor }{\frac {n}{m}}{\bigr \rfloor }-{\bigl \lfloor }{\frac {n-1}{m}}{\bigr \rfloor }}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>n</mi> <mi>m</mi> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">&#x230B;</mo> </mrow> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">&#x230B;</mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\textstyle {\bigl \lfloor }{\frac {n}{m}}{\bigr \rfloor }-{\bigl \lfloor }{\frac {n-1}{m}}{\bigr \rfloor }}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d26f01eabbc33767bf439c24b7a1f15b8c200fd9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:13.432ex; height:3.509ex;" alt="{\textstyle {\bigl \lfloor }{\frac {n}{m}}{\bigr \rfloor }-{\bigl \lfloor }{\frac {n-1}{m}}{\bigr \rfloor }}"></span> is equal to 1 if <i>m</i> divides <i>n</i>, and to 0 otherwise, it follows that a positive integer <i>n</i> is a prime <a href="/wiki/If_and_only_if" title="If and only if">if and only if</a><sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">&#91;</span>30<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{m=1}^{\infty }\left({\biggl \lfloor }{\frac {n}{m}}{\biggr \rfloor }-{\biggl \lfloor }{\frac {n-1}{m}}{\biggr \rfloor }\right)=2.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </munderover> <mrow> <mo>(</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="2.047em" minsize="2.047em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>n</mi> <mi>m</mi> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="2.047em" minsize="2.047em">&#x230B;</mo> </mrow> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="2.047em" minsize="2.047em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="2.047em" minsize="2.047em">&#x230B;</mo> </mrow> </mrow> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mn>2.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{m=1}^{\infty }\left({\biggl \lfloor }{\frac {n}{m}}{\biggr \rfloor }-{\biggl \lfloor }{\frac {n-1}{m}}{\biggr \rfloor }\right)=2.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/925dcf1a465a90b4fa72fd99389d1dfeaeeff747" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:29.631ex; height:6.843ex;" alt="{\displaystyle \sum _{m=1}^{\infty }\left({\biggl \lfloor }{\frac {n}{m}}{\biggr \rfloor }-{\biggl \lfloor }{\frac {n-1}{m}}{\biggr \rfloor }\right)=2.}"></span></dd></dl> <p>One may also give formulas for producing the prime numbers. For example, let <i>p</i><sub><i>n</i></sub> be the <i>n</i>-th prime, and for any integer <i>r</i>&#160;&gt;&#160;1, define the real number <i>α</i> by the sum </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \alpha =\sum _{m=1}^{\infty }p_{m}r^{-m^{2}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03B1;<!-- α --></mi> <mo>=</mo> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> </mrow> </munderover> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>&#x2212;<!-- − --></mo> <msup> <mi>m</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \alpha =\sum _{m=1}^{\infty }p_{m}r^{-m^{2}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bf02877ba996f8884e7ead7d57944017f3498d43" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:16.842ex; height:6.843ex;" alt="{\displaystyle \alpha =\sum _{m=1}^{\infty }p_{m}r^{-m^{2}}.}"></span></dd></dl> <p>Then<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">&#91;</span>31<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}=\left\lfloor r^{n^{2}}\alpha \right\rfloor -r^{2n-1}\left\lfloor r^{(n-1)^{2}}\alpha \right\rfloor .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mrow> </msup> <mi>&#x03B1;<!-- α --></mi> </mrow> <mo>&#x230B;</mo> </mrow> <mo>&#x2212;<!-- − --></mo> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mrow> <mo>&#x230A;</mo> <mrow> <msup> <mi>r</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mrow> </msup> <mi>&#x03B1;<!-- α --></mi> </mrow> <mo>&#x230B;</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}=\left\lfloor r^{n^{2}}\alpha \right\rfloor -r^{2n-1}\left\lfloor r^{(n-1)^{2}}\alpha \right\rfloor .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/90bcc72261e391cc4e3d104c07491dbe39e9d00f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; margin-left: -0.089ex; width:32.489ex; height:4.843ex;" alt="{\displaystyle p_{n}=\left\lfloor r^{n^{2}}\alpha \right\rfloor -r^{2n-1}\left\lfloor r^{(n-1)^{2}}\alpha \right\rfloor .}"></span></dd></dl> <p>A similar result is that there is a number <i>θ</i> = 1.3064... (<a href="/wiki/Mills%27_constant" title="Mills&#39; constant">Mills' constant</a>) with the property that </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor \theta ^{3}\right\rfloor ,\left\lfloor \theta ^{9}\right\rfloor ,\left\lfloor \theta ^{27}\right\rfloor ,\dots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <msup> <mi>&#x03B8;<!-- θ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>3</mn> </mrow> </msup> <mo>&#x230B;</mo> </mrow> <mo>,</mo> <mrow> <mo>&#x230A;</mo> <msup> <mi>&#x03B8;<!-- θ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>9</mn> </mrow> </msup> <mo>&#x230B;</mo> </mrow> <mo>,</mo> <mrow> <mo>&#x230A;</mo> <msup> <mi>&#x03B8;<!-- θ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>27</mn> </mrow> </msup> <mo>&#x230B;</mo> </mrow> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor \theta ^{3}\right\rfloor ,\left\lfloor \theta ^{9}\right\rfloor ,\left\lfloor \theta ^{27}\right\rfloor ,\dots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3bcc1a49888c8d60157dde4dfe390d8af7558a04" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:20.827ex; height:3.343ex;" alt="{\displaystyle \left\lfloor \theta ^{3}\right\rfloor ,\left\lfloor \theta ^{9}\right\rfloor ,\left\lfloor \theta ^{27}\right\rfloor ,\dots }"></span></dd></dl> <p>are all prime.<sup id="cite_ref-Ribenboim,_p._186_32-0" class="reference"><a href="#cite_note-Ribenboim,_p._186-32"><span class="cite-bracket">&#91;</span>32<span class="cite-bracket">&#93;</span></a></sup> </p><p>There is also a number <i>ω</i> = 1.9287800... with the property that </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor 2^{\omega }\right\rfloor ,\left\lfloor 2^{2^{\omega }}\right\rfloor ,\left\lfloor 2^{2^{2^{\omega }}}\right\rfloor ,\dots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>&#x03C9;<!-- ω --></mi> </mrow> </msup> <mo>&#x230B;</mo> </mrow> <mo>,</mo> <mrow> <mo>&#x230A;</mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>&#x03C9;<!-- ω --></mi> </mrow> </msup> </mrow> </msup> <mo>&#x230B;</mo> </mrow> <mo>,</mo> <mrow> <mo>&#x230A;</mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>&#x03C9;<!-- ω --></mi> </mrow> </msup> </mrow> </msup> </mrow> </msup> <mo>&#x230B;</mo> </mrow> <mo>,</mo> <mo>&#x2026;<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor 2^{\omega }\right\rfloor ,\left\lfloor 2^{2^{\omega }}\right\rfloor ,\left\lfloor 2^{2^{2^{\omega }}}\right\rfloor ,\dots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/35a5047c7cc7d89def04ce577f4ca56a4476540e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:23.601ex; height:4.843ex;" alt="{\displaystyle \left\lfloor 2^{\omega }\right\rfloor ,\left\lfloor 2^{2^{\omega }}\right\rfloor ,\left\lfloor 2^{2^{2^{\omega }}}\right\rfloor ,\dots }"></span></dd></dl> <p>are all prime.<sup id="cite_ref-Ribenboim,_p._186_32-1" class="reference"><a href="#cite_note-Ribenboim,_p._186-32"><span class="cite-bracket">&#91;</span>32<span class="cite-bracket">&#93;</span></a></sup> </p><p>Let <span class="texhtml mvar" style="font-style:italic;">π</span>(<i>x</i>) be the number of primes less than or equal to <i>x</i>. It is a straightforward deduction from <a href="/wiki/Wilson%27s_theorem" title="Wilson&#39;s theorem">Wilson's theorem</a> that<sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">&#91;</span>33<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi (n)=\sum _{j=2}^{n}{\Biggl \lfloor }{\frac {(j-1)!+1}{j}}-\left\lfloor {\frac {(j-1)!}{j}}\right\rfloor {\Biggr \rfloor }.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03C0;<!-- π --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="2.470em" minsize="2.470em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>j</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>!</mo> <mo>+</mo> <mn>1</mn> </mrow> <mi>j</mi> </mfrac> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo stretchy="false">(</mo> <mi>j</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>!</mo> </mrow> <mi>j</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="2.470em" minsize="2.470em">&#x230B;</mo> </mrow> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \pi (n)=\sum _{j=2}^{n}{\Biggl \lfloor }{\frac {(j-1)!+1}{j}}-\left\lfloor {\frac {(j-1)!}{j}}\right\rfloor {\Biggr \rfloor }.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b203e86ca4c84fe8410d87c7e07db075e19f5ece" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.338ex; width:41.441ex; height:7.676ex;" alt="{\displaystyle \pi (n)=\sum _{j=2}^{n}{\Biggl \lfloor }{\frac {(j-1)!+1}{j}}-\left\lfloor {\frac {(j-1)!}{j}}\right\rfloor {\Biggr \rfloor }.}"></span></dd></dl> <p>Also, if <i>n</i> ≥ 2,<sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">&#91;</span>34<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi (n)=\sum _{j=2}^{n}{\Biggl \lfloor }1\,{\bigg /}\ {\sum _{k=2}^{j}\left\lfloor \left\lfloor {\frac {j}{k}}\right\rfloor {\frac {k}{j}}\right\rfloor }{\Biggr \rfloor }.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03C0;<!-- π --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> <mo>=</mo> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="2.470em" minsize="2.470em">&#x230A;</mo> </mrow> </mrow> <mn>1</mn> <mspace width="thinmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo fence="true" stretchy="true" symmetric="true" maxsize="2.047em" minsize="2.047em">/</mo> </mrow> </mrow> <mtext>&#xA0;</mtext> <mrow class="MJX-TeXAtom-ORD"> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> </mrow> </munderover> <mrow> <mo>&#x230A;</mo> <mrow> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>j</mi> <mi>k</mi> </mfrac> </mrow> <mo>&#x230B;</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>k</mi> <mi>j</mi> </mfrac> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="2.470em" minsize="2.470em">&#x230B;</mo> </mrow> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \pi (n)=\sum _{j=2}^{n}{\Biggl \lfloor }1\,{\bigg /}\ {\sum _{k=2}^{j}\left\lfloor \left\lfloor {\frac {j}{k}}\right\rfloor {\frac {k}{j}}\right\rfloor }{\Biggr \rfloor }.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d3537a84805123b00c924b2a4db444b404ed807a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.338ex; width:33.195ex; height:7.676ex;" alt="{\displaystyle \pi (n)=\sum _{j=2}^{n}{\Biggl \lfloor }1\,{\bigg /}\ {\sum _{k=2}^{j}\left\lfloor \left\lfloor {\frac {j}{k}}\right\rfloor {\frac {k}{j}}\right\rfloor }{\Biggr \rfloor }.}"></span></dd></dl> <p>None of the formulas in this section are of any practical use.<sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">&#91;</span>35<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span class="cite-bracket">&#91;</span>36<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Solved_problems">Solved problems</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=20" title="Edit section: Solved problems"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Ramanujan" class="mw-redirect" title="Ramanujan">Ramanujan</a> submitted these problems to the <i>Journal of the Indian Mathematical Society</i>.<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">&#91;</span>37<span class="cite-bracket">&#93;</span></a></sup> </p><p>If <i>n</i> is a positive integer, prove that </p> <ol type="i"> <li> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor {\tfrac {n}{3}}\right\rfloor +\left\lfloor {\tfrac {n+2}{6}}\right\rfloor +\left\lfloor {\tfrac {n+4}{6}}\right\rfloor =\left\lfloor {\tfrac {n}{2}}\right\rfloor +\left\lfloor {\tfrac {n+3}{6}}\right\rfloor ,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>n</mi> <mn>3</mn> </mfrac> </mstyle> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mrow> <mi>n</mi> <mo>+</mo> <mn>2</mn> </mrow> <mn>6</mn> </mfrac> </mstyle> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mrow> <mi>n</mi> <mo>+</mo> <mn>4</mn> </mrow> <mn>6</mn> </mfrac> </mstyle> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mi>n</mi> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo>&#x230B;</mo> </mrow> <mo>+</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mrow> <mi>n</mi> <mo>+</mo> <mn>3</mn> </mrow> <mn>6</mn> </mfrac> </mstyle> </mrow> <mo>&#x230B;</mo> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor {\tfrac {n}{3}}\right\rfloor +\left\lfloor {\tfrac {n+2}{6}}\right\rfloor +\left\lfloor {\tfrac {n+4}{6}}\right\rfloor =\left\lfloor {\tfrac {n}{2}}\right\rfloor +\left\lfloor {\tfrac {n+3}{6}}\right\rfloor ,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/797f3135dde7f62f3c2e9e1dd31f639211c83ec6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:40.082ex; height:4.843ex;" alt="{\displaystyle \left\lfloor {\tfrac {n}{3}}\right\rfloor +\left\lfloor {\tfrac {n+2}{6}}\right\rfloor +\left\lfloor {\tfrac {n+4}{6}}\right\rfloor =\left\lfloor {\tfrac {n}{2}}\right\rfloor +\left\lfloor {\tfrac {n+3}{6}}\right\rfloor ,}"></span></li> <li> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor {\tfrac {1}{2}}+{\sqrt {n+{\tfrac {1}{2}}}}\right\rfloor =\left\lfloor {\tfrac {1}{2}}+{\sqrt {n+{\tfrac {1}{4}}}}\right\rfloor ,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mi>n</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </msqrt> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mi>n</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>4</mn> </mfrac> </mstyle> </mrow> </msqrt> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor {\tfrac {1}{2}}+{\sqrt {n+{\tfrac {1}{2}}}}\right\rfloor =\left\lfloor {\tfrac {1}{2}}+{\sqrt {n+{\tfrac {1}{4}}}}\right\rfloor ,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7305c5199b173f7942be4f22291519bb64373f6a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:34.473ex; height:4.843ex;" alt="{\displaystyle \left\lfloor {\tfrac {1}{2}}+{\sqrt {n+{\tfrac {1}{2}}}}\right\rfloor =\left\lfloor {\tfrac {1}{2}}+{\sqrt {n+{\tfrac {1}{4}}}}\right\rfloor ,}"></span></li> <li> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor {\sqrt {n}}+{\sqrt {n+1}}\right\rfloor =\left\lfloor {\sqrt {4n+2}}\right\rfloor .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mi>n</mi> </msqrt> </mrow> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mi>n</mi> <mo>+</mo> <mn>1</mn> </msqrt> </mrow> </mrow> <mo>&#x230B;</mo> </mrow> <mo>=</mo> <mrow> <mo>&#x230A;</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mn>4</mn> <mi>n</mi> <mo>+</mo> <mn>2</mn> </msqrt> </mrow> <mo>&#x230B;</mo> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor {\sqrt {n}}+{\sqrt {n+1}}\right\rfloor =\left\lfloor {\sqrt {4n+2}}\right\rfloor .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eda91c12d6f632f7343bcec2645f0114d5ff583f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:30.522ex; height:3.176ex;" alt="{\displaystyle \left\lfloor {\sqrt {n}}+{\sqrt {n+1}}\right\rfloor =\left\lfloor {\sqrt {4n+2}}\right\rfloor .}"></span></li> </ol><p>Some generalizations to the above floor function identities have been proven.<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">&#91;</span>38<span class="cite-bracket">&#93;</span></a></sup> </p><div class="mw-heading mw-heading3"><h3 id="Unsolved_problem">Unsolved problem</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=21" title="Edit section: Unsolved problem"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The study of <a href="/wiki/Waring%27s_problem" title="Waring&#39;s problem">Waring's problem</a> has led to an unsolved problem: </p><p>Are there any positive integers <i>k</i> ≥ 6 such that<sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">&#91;</span>39<span class="cite-bracket">&#93;</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 3^{k}-2^{k}{\Bigl \lfloor }{\bigl (}{\tfrac {3}{2}}{\bigr )}^{k}{\Bigr \rfloor }&gt;2^{k}-{\Bigl \lfloor }{\bigl (}{\tfrac {3}{2}}{\bigr )}^{k}{\Bigr \rfloor }-2\ ?}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>3</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mo>&#x2212;<!-- − --></mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.623em" minsize="1.623em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>3</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <msup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.623em" minsize="1.623em">&#x230B;</mo> </mrow> </mrow> <mo>&gt;</mo> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.623em" minsize="1.623em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>3</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> <msup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.623em" minsize="1.623em">&#x230B;</mo> </mrow> </mrow> <mo>&#x2212;<!-- − --></mo> <mn>2</mn> <mtext>&#xA0;</mtext> <mo>?</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 3^{k}-2^{k}{\Bigl \lfloor }{\bigl (}{\tfrac {3}{2}}{\bigr )}^{k}{\Bigr \rfloor }&gt;2^{k}-{\Bigl \lfloor }{\bigl (}{\tfrac {3}{2}}{\bigr )}^{k}{\Bigr \rfloor }-2\ ?}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/01e8b7193c43f1a515129d026736c57538165a49" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:35.877ex; height:4.843ex;" alt="{\displaystyle 3^{k}-2^{k}{\Bigl \lfloor }{\bigl (}{\tfrac {3}{2}}{\bigr )}^{k}{\Bigr \rfloor }&gt;2^{k}-{\Bigl \lfloor }{\bigl (}{\tfrac {3}{2}}{\bigr )}^{k}{\Bigr \rfloor }-2\ ?}"></span></dd></dl> <p><a href="/wiki/Kurt_Mahler" title="Kurt Mahler">Mahler</a> has proved there can only be a finite number of such <i>k</i>; none are known.<sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">&#91;</span>40<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Computer_implementations">Computer implementations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=22" title="Edit section: Computer implementations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Int_function.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Int_function.svg/220px-Int_function.svg.png" decoding="async" width="220" height="220" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Int_function.svg/330px-Int_function.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Int_function.svg/440px-Int_function.svg.png 2x" data-file-width="1000" data-file-height="1000" /></a><figcaption>Int function from floating-point conversion in <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a></figcaption></figure> <p>In most programming languages, the simplest method to convert a floating point number to an integer does not do floor or ceiling, but truncation. The reason for this is historical, as the first machines used <a href="/wiki/Ones%27_complement" title="Ones&#39; complement">ones' complement</a> and truncation was simpler to implement (floor is simpler in <a href="/wiki/Two%27s_complement" title="Two&#39;s complement">two's complement</a>). <a href="/wiki/FORTRAN" class="mw-redirect" title="FORTRAN">FORTRAN</a> was defined to require this behavior and thus almost all processors implement conversion this way. Some consider this to be an unfortunate historical design decision that has led to bugs handling negative offsets and graphics on the negative side of the origin.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (November 2018)">citation needed</span></a></i>&#93;</sup> </p><p>An <a href="/wiki/Arithmetic_shift" title="Arithmetic shift">arithmetic right-shift</a> of a signed integer <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span> by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}"></span> is the same as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\lfloor x/2^{n}\right\rfloor }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow> <mo>&#x230A;</mo> <mrow> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msup> </mrow> <mo>&#x230B;</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \left\lfloor x/2^{n}\right\rfloor }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e3cdf93590885c92f8d0975bc51e20571ec32e87" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.938ex; height:2.843ex;" alt="{\displaystyle \left\lfloor x/2^{n}\right\rfloor }"></span>. Division by a power of 2 is often written as a right-shift, not for optimization as might be assumed, but because the floor of negative results is required. Assuming such shifts are "premature optimization" and replacing them with division can break software.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (March 2019)">citation needed</span></a></i>&#93;</sup> </p><p>Many programming languages (including <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a>, <a href="/wiki/C%2B%2B" title="C++">C++</a>,<sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">&#91;</span>41<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span class="cite-bracket">&#91;</span>42<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/C%EF%BC%83_(programming_language)" class="mw-redirect" title="C# (programming language)">C#</a>,<sup id="cite_ref-43" class="reference"><a href="#cite_note-43"><span class="cite-bracket">&#91;</span>43<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-44" class="reference"><a href="#cite_note-44"><span class="cite-bracket">&#91;</span>44<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a>,<sup id="cite_ref-45" class="reference"><a href="#cite_note-45"><span class="cite-bracket">&#91;</span>45<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-46" class="reference"><a href="#cite_note-46"><span class="cite-bracket">&#91;</span>46<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/Julia_(programming_language)" title="Julia (programming language)">Julia</a>,<sup id="cite_ref-47" class="reference"><a href="#cite_note-47"><span class="cite-bracket">&#91;</span>47<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/PHP" title="PHP">PHP</a>,<sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span class="cite-bracket">&#91;</span>48<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-49" class="reference"><a href="#cite_note-49"><span class="cite-bracket">&#91;</span>49<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/R_(programming_language)" title="R (programming language)">R</a>,<sup id="cite_ref-50" class="reference"><a href="#cite_note-50"><span class="cite-bracket">&#91;</span>50<span class="cite-bracket">&#93;</span></a></sup> and <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a><sup id="cite_ref-51" class="reference"><a href="#cite_note-51"><span class="cite-bracket">&#91;</span>51<span class="cite-bracket">&#93;</span></a></sup>) provide standard functions for floor and ceiling, usually called <code>floor</code> and <code>ceil</code>, or less commonly <code>ceiling</code>.<sup id="cite_ref-52" class="reference"><a href="#cite_note-52"><span class="cite-bracket">&#91;</span>52<span class="cite-bracket">&#93;</span></a></sup> The language <a href="/wiki/APL_(programming_language)" title="APL (programming language)">APL</a> uses <code>⌊x</code> for floor. The <a href="/wiki/J_(programming_language)" title="J (programming language)">J Programming Language</a>, a follow-on to APL that is designed to use standard keyboard symbols, uses <code>&lt;.</code> for floor and <code>&gt;.</code> for ceiling.<sup id="cite_ref-53" class="reference"><a href="#cite_note-53"><span class="cite-bracket">&#91;</span>53<span class="cite-bracket">&#93;</span></a></sup> <a href="/wiki/ALGOL" title="ALGOL">ALGOL</a> uses<code>entier</code> for floor. </p><p>In <a href="/wiki/Microsoft_Excel" title="Microsoft Excel">Microsoft Excel</a> the function <code>INT</code> rounds down rather than toward zero,<sup id="cite_ref-54" class="reference"><a href="#cite_note-54"><span class="cite-bracket">&#91;</span>54<span class="cite-bracket">&#93;</span></a></sup> while <code>FLOOR</code> rounds toward zero, the opposite of what "int" and "floor" do in other languages. Since 2010 <code>FLOOR</code> has been changed to error if the number is negative.<sup id="cite_ref-55" class="reference"><a href="#cite_note-55"><span class="cite-bracket">&#91;</span>55<span class="cite-bracket">&#93;</span></a></sup> The <a href="/wiki/OpenDocument" title="OpenDocument">OpenDocument</a> file format, as used by <a href="/wiki/OpenOffice.org" title="OpenOffice.org">OpenOffice.org</a>, <a href="/wiki/Libreoffice" class="mw-redirect" title="Libreoffice">Libreoffice</a> and others, <code>INT</code><sup id="cite_ref-56" class="reference"><a href="#cite_note-56"><span class="cite-bracket">&#91;</span>56<span class="cite-bracket">&#93;</span></a></sup> and <code>FLOOR</code> both do floor, and <code>FLOOR</code> has a third argument to reproduce Excel's earlier behavior.<sup id="cite_ref-57" class="reference"><a href="#cite_note-57"><span class="cite-bracket">&#91;</span>57<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=23" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Bracket_(mathematics)" title="Bracket (mathematics)">Bracket (mathematics)</a></li> <li><a href="/wiki/Integer-valued_function" title="Integer-valued function">Integer-valued function</a></li> <li><a href="/wiki/Step_function" title="Step function">Step function</a></li> <li><a href="/wiki/Modulo_operation" class="mw-redirect" title="Modulo operation">Modulo operation</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Citations">Citations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=24" title="Edit section: Citations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist reflist-columns references-column-width" style="column-width: 30em;"> <ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, Ch. 3.1</span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"> 1) Luke Heaton, <i>A Brief History of Mathematical Thought</i>, 2015, <style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/1472117158" title="Special:BookSources/1472117158">1472117158</a> (n.p.) <br />2) Albert A. Blank <i>et al.</i>, <i>Calculus: Differential Calculus</i>, 1968, p. 259 <br />3) John W. Warris, Horst Stocker, <i>Handbook of mathematics and computational science</i>, 1998, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0387947469" title="Special:BookSources/0387947469">0387947469</a>, p. 151</span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text">Lemmermeyer, pp.&#160;10, 23.</span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text">e.g. Cassels, Hardy &amp; Wright, and Ribenboim use Gauss's notation. Graham, Knuth &amp; Patashnik, and Crandall &amp; Pomerance use Iverson's.</span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text">Iverson, p.&#160;12.</span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text">Higham, p.&#160;25.</span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.mathwords.com/f/floor_function.htm">Mathwords: Floor Function</a>.</span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.mathwords.com/c/ceiling_function.htm">Mathwords: Ceiling Function</a></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, p.&#160;70.</span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.latex-project.org/news/latex2e-news/ltnews28.pdf">"LaTeX News, Issue&#160;28"</a> <span class="cs1-format">(PDF; 379&#160;KB)</span>. The LaTeX Project. April 2018<span class="reference-accessdate">. Retrieved <span class="nowrap">27 July</span> 2024</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=LaTeX+News%2C+Issue+28&amp;rft.pub=The+LaTeX+Project&amp;rft.date=2018-04&amp;rft_id=https%3A%2F%2Fwww.latex-project.org%2Fnews%2Flatex2e-news%2Fltnews28.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashink, Ch. 3</span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, p. 73</span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, p. 85</span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, p. 85 and Ex. 3.15</span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, Ex. 3.12</span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, p. 94.</span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, p. 94</span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, p. 71, apply theorem 3.10 with x/m as input and the division by n as function</span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text">Titchmarsh, p. 15, Eq. 2.1.7</span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text">Lemmermeyer, § 1.4, Ex. 1.32–1.33</span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text">Hardy &amp; Wright, §§ 6.11–6.13</span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text">Lemmermeyer, p. 25</span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><abbr title="On-Line Encyclopedia of Integer Sequences">OEIS</abbr> <a rel="nofollow" class="external text" href="https://oeis.org/A000522">sequence&#x20;A000522&#x20;(Total number of arrangements of a set with n elements: a(n) = Sum_{k=0..n} n!/k!.)</a> (See Formulas.)</span> </li> <li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text">Hardy &amp; Wright, Th. 416</span> </li> <li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text">Graham, Knuth, &amp; Patashnik, pp. 77–78</span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text">These formulas are from the Wikipedia article <a href="/wiki/Euler%E2%80%93Mascheroni_constant" class="mw-redirect" title="Euler–Mascheroni constant">Euler's constant</a>, which has many more.</span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text">Titchmarsh, p. 13</span> </li> <li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text">Titchmarsh, pp.14–15</span> </li> <li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text">Crandall &amp; Pomerance, p. 391</span> </li> <li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text">Crandall &amp; Pomerance, Ex. 1.3, p. 46. The infinite upper limit of the sum can be replaced with <i>n</i>. An equivalent condition is <i>n</i>&#160;&gt;&#160;1 is prime if and only if <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle \sum _{m=1}^{\lfloor {\sqrt {n}}\rfloor }{\bigl (}{\bigl \lfloor }{\frac {n}{m}}{\bigr \rfloor }-{\bigl \lfloor }{\frac {n-1}{m}}{\bigr \rfloor }{\bigr )}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <munderover> <mo>&#x2211;<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo fence="false" stretchy="false">&#x230A;<!-- ⌊ --></mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mi>n</mi> </msqrt> </mrow> <mo fence="false" stretchy="false">&#x230B;<!-- ⌋ --></mo> </mrow> </munderover> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>n</mi> <mi>m</mi> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">&#x230B;</mo> </mrow> </mrow> <mo>&#x2212;<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="1.2em" minsize="1.2em">&#x230A;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>n</mi> <mo>&#x2212;<!-- − --></mo> <mn>1</mn> </mrow> <mi>m</mi> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">&#x230B;</mo> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\textstyle \sum _{m=1}^{\lfloor {\sqrt {n}}\rfloor }{\bigl (}{\bigl \lfloor }{\frac {n}{m}}{\bigr \rfloor }-{\bigl \lfloor }{\frac {n-1}{m}}{\bigr \rfloor }{\bigr )}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0b735416d507f80bbddb3e2d5857cbcf157bc39b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:26.711ex; height:3.843ex;" alt="{\textstyle \sum _{m=1}^{\lfloor {\sqrt {n}}\rfloor }{\bigl (}{\bigl \lfloor }{\frac {n}{m}}{\bigr \rfloor }-{\bigl \lfloor }{\frac {n-1}{m}}{\bigr \rfloor }{\bigr )}=1}"></span> .</span> </li> <li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text">Hardy &amp; Wright, § 22.3</span> </li> <li id="cite_note-Ribenboim,_p._186-32"><span class="mw-cite-backlink">^ <a href="#cite_ref-Ribenboim,_p._186_32-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Ribenboim,_p._186_32-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text">Ribenboim, p. 186</span> </li> <li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-33">^</a></b></span> <span class="reference-text">Ribenboim, p. 181</span> </li> <li id="cite_note-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-34">^</a></b></span> <span class="reference-text">Crandall &amp; Pomerance, Ex. 1.4, p. 46</span> </li> <li id="cite_note-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-35">^</a></b></span> <span class="reference-text">Ribenboim, p. 180 says that "Despite the nil practical value of the formulas ... [they] may have some relevance to logicians who wish to understand clearly how various parts of arithmetic may be deduced from different axiomatzations ... "</span> </li> <li id="cite_note-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-36">^</a></b></span> <span class="reference-text">Hardy &amp; Wright, pp. 344—345 "Any one of these formulas (or any similar one) would attain a different status if the exact value of the number α ... could be expressed independently of the primes. There seems no likelihood of this, but it cannot be ruled out as entirely impossible."</span> </li> <li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-37">^</a></b></span> <span class="reference-text">Ramanujan, Question 723, <i>Papers</i> p. 332</span> </li> <li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSomuKukla2022" class="citation journal cs1">Somu, Sai Teja; Kukla, Andrzej (2022). <a rel="nofollow" class="external text" href="http://math.colgate.edu/~integers/w33/w33.pdf">"On some generalizations to floor function identities of Ramanujan"</a> <span class="cs1-format">(PDF)</span>. <i>Integers</i>. <b>22</b>. <a href="/wiki/ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/2109.03680">2109.03680</a></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Integers&amp;rft.atitle=On+some+generalizations+to+floor+function+identities+of+Ramanujan&amp;rft.volume=22&amp;rft.date=2022&amp;rft_id=info%3Aarxiv%2F2109.03680&amp;rft.aulast=Somu&amp;rft.aufirst=Sai+Teja&amp;rft.au=Kukla%2C+Andrzej&amp;rft_id=http%3A%2F%2Fmath.colgate.edu%2F~integers%2Fw33%2Fw33.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-39">^</a></b></span> <span class="reference-text">Hardy &amp; Wright, p. 337</span> </li> <li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-40">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMahler1957" class="citation journal cs1"><a href="/wiki/Kurt_Mahler" title="Kurt Mahler">Mahler, Kurt</a> (1957). "On the fractional parts of the powers of a rational number II". <i><a href="/wiki/Mathematika" title="Mathematika">Mathematika</a></i>. <b>4</b> (2): 122–124. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1112%2FS0025579300001170">10.1112/S0025579300001170</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Mathematika&amp;rft.atitle=On+the+fractional+parts+of+the+powers+of+a+rational+number+II&amp;rft.volume=4&amp;rft.issue=2&amp;rft.pages=122-124&amp;rft.date=1957&amp;rft_id=info%3Adoi%2F10.1112%2FS0025579300001170&amp;rft.aulast=Mahler&amp;rft.aufirst=Kurt&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-41">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://en.cppreference.com/w/cpp/numeric/math/floor">"C++ reference of <code>floor</code> function"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">5 December</span> 2010</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=C%2B%2B+reference+of+%3Ccode%3Efloor%3C%2Fcode%3E+function&amp;rft_id=http%3A%2F%2Fen.cppreference.com%2Fw%2Fcpp%2Fnumeric%2Fmath%2Ffloor&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-42">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://en.cppreference.com/w/cpp/numeric/math/ceil">"C++ reference of <code>ceil</code> function"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">5 December</span> 2010</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=C%2B%2B+reference+of+%3Ccode%3Eceil%3C%2Fcode%3E+function&amp;rft_id=http%3A%2F%2Fen.cppreference.com%2Fw%2Fcpp%2Fnumeric%2Fmath%2Fceil&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-43">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFdotnet-bot" class="citation web cs1">dotnet-bot. <a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/dotnet/api/system.math.floor">"Math.Floor Method (System)"</a>. <i>docs.microsoft.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">28 November</span> 2019</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=docs.microsoft.com&amp;rft.atitle=Math.Floor+Method+%28System%29&amp;rft.au=dotnet-bot&amp;rft_id=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fdotnet%2Fapi%2Fsystem.math.floor&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-44"><span class="mw-cite-backlink"><b><a href="#cite_ref-44">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFdotnet-bot" class="citation web cs1">dotnet-bot. <a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/dotnet/api/system.math.ceiling">"Math.Ceiling Method (System)"</a>. <i>docs.microsoft.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">28 November</span> 2019</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=docs.microsoft.com&amp;rft.atitle=Math.Ceiling+Method+%28System%29&amp;rft.au=dotnet-bot&amp;rft_id=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fdotnet%2Fapi%2Fsystem.math.ceiling&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-45"><span class="mw-cite-backlink"><b><a href="#cite_ref-45">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/javase/9/docs/api/java/lang/Math.html#floor-double-">"Math (Java SE 9 &amp; JDK 9 )"</a>. <i>docs.oracle.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">20 November</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=docs.oracle.com&amp;rft.atitle=Math+%28Java+SE+9+%26+JDK+9+%29&amp;rft_id=https%3A%2F%2Fdocs.oracle.com%2Fjavase%2F9%2Fdocs%2Fapi%2Fjava%2Flang%2FMath.html%23floor-double-&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-46"><span class="mw-cite-backlink"><b><a href="#cite_ref-46">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/javase/9/docs/api/java/lang/Math.html#ceil-double-">"Math (Java SE 9 &amp; JDK 9 )"</a>. <i>docs.oracle.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">20 November</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=docs.oracle.com&amp;rft.atitle=Math+%28Java+SE+9+%26+JDK+9+%29&amp;rft_id=https%3A%2F%2Fdocs.oracle.com%2Fjavase%2F9%2Fdocs%2Fapi%2Fjava%2Flang%2FMath.html%23ceil-double-&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-47"><span class="mw-cite-backlink"><b><a href="#cite_ref-47">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.julialang.org/en/v1/base/math/">"Math (Julia v1.10)"</a>. <i>docs.julialang.org/en/v1/</i><span class="reference-accessdate">. Retrieved <span class="nowrap">4 September</span> 2024</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=docs.julialang.org%2Fen%2Fv1%2F&amp;rft.atitle=Math+%28Julia+v1.10%29&amp;rft_id=https%3A%2F%2Fdocs.julialang.org%2Fen%2Fv1%2Fbase%2Fmath%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-48"><span class="mw-cite-backlink"><b><a href="#cite_ref-48">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://php.net/manual/function.ceil.php">"PHP manual for <code>ceil</code> function"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">18 July</span> 2013</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=PHP+manual+for+%3Ccode%3Eceil%3C%2Fcode%3E+function&amp;rft_id=http%3A%2F%2Fphp.net%2Fmanual%2Ffunction.ceil.php&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-49"><span class="mw-cite-backlink"><b><a href="#cite_ref-49">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://php.net/manual/function.floor.php">"PHP manual for <code>floor</code> function"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">18 July</span> 2013</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=PHP+manual+for+%3Ccode%3Efloor%3C%2Fcode%3E+function&amp;rft_id=http%3A%2F%2Fphp.net%2Fmanual%2Ffunction.floor.php&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-50"><span class="mw-cite-backlink"><b><a href="#cite_ref-50">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://stat.ethz.ch/R-manual/R-devel/library/base/html/Round.html">"R: Rounding of Numbers"</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=R%3A+Rounding+of+Numbers&amp;rft_id=https%3A%2F%2Fstat.ethz.ch%2FR-manual%2FR-devel%2Flibrary%2Fbase%2Fhtml%2FRound.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-51"><span class="mw-cite-backlink"><b><a href="#cite_ref-51">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.python.org/2/library/math.html">"Python manual for <code>math</code> module"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">18 July</span> 2013</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Python+manual+for+%3Ccode%3Emath%3C%2Fcode%3E+module&amp;rft_id=https%3A%2F%2Fdocs.python.org%2F2%2Flibrary%2Fmath.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-52"><span class="mw-cite-backlink"><b><a href="#cite_ref-52">^</a></b></span> <span class="reference-text">Sullivan, p.&#160;86.</span> </li> <li id="cite_note-53"><span class="mw-cite-backlink"><b><a href="#cite_ref-53">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.jsoftware.com/help/dictionary/vocabul.htm">"Vocabulary"</a>. <i>J Language</i><span class="reference-accessdate">. Retrieved <span class="nowrap">6 September</span> 2011</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=J+Language&amp;rft.atitle=Vocabulary&amp;rft_id=http%3A%2F%2Fwww.jsoftware.com%2Fhelp%2Fdictionary%2Fvocabul.htm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-54"><span class="mw-cite-backlink"><b><a href="#cite_ref-54">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://support.microsoft.com/en-us/office/int-function-a6c4af9e-356d-4369-ab6a-cb1fd9d343ef">"INT function"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">29 October</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=INT+function&amp;rft_id=https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fint-function-a6c4af9e-356d-4369-ab6a-cb1fd9d343ef&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-55"><span class="mw-cite-backlink"><b><a href="#cite_ref-55">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://support.microsoft.com/en-us/office/floor-function-14bb497c-24f2-4e04-b327-b0b4de5a8886">"FLOOR function"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">29 October</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=FLOOR+function&amp;rft_id=https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Ffloor-function-14bb497c-24f2-4e04-b327-b0b4de5a8886&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-56"><span class="mw-cite-backlink"><b><a href="#cite_ref-56">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_INT_function">"Documentation/How Tos/Calc: INT function"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">29 October</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Documentation%2FHow+Tos%2FCalc%3A+INT+function&amp;rft_id=https%3A%2F%2Fwiki.openoffice.org%2Fwiki%2FDocumentation%2FHow_Tos%2FCalc%3A_INT_function&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> <li id="cite_note-57"><span class="mw-cite-backlink"><b><a href="#cite_ref-57">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_FLOOR_function">"Documentation/How Tos/Calc: FLOOR function"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">29 October</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Documentation%2FHow+Tos%2FCalc%3A+FLOOR+function&amp;rft_id=https%3A%2F%2Fwiki.openoffice.org%2Fwiki%2FDocumentation%2FHow_Tos%2FCalc%3A_FLOOR_function&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=25" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJ.W.S._Cassels1957" class="citation cs2">J.W.S. Cassels (1957), <i>An introduction to Diophantine approximation</i>, Cambridge Tracts in Mathematics and Mathematical Physics, vol.&#160;45, <a href="/wiki/Cambridge_University_Press" title="Cambridge University Press">Cambridge University Press</a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=An+introduction+to+Diophantine+approximation&amp;rft.series=Cambridge+Tracts+in+Mathematics+and+Mathematical+Physics&amp;rft.pub=Cambridge+University+Press&amp;rft.date=1957&amp;rft.au=J.W.S.+Cassels&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCrandallPomerance2001" class="citation cs2">Crandall, Richard; Pomerance, Carl (2001), <a rel="nofollow" class="external text" href="https://books.google.com/books?id=8KZ4RQufxhYC"><i>Prime Numbers: A Computational Perspective</i></a>, New York: <a href="/wiki/Springer_Science%2BBusiness_Media" title="Springer Science+Business Media">Springer</a>, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-387-94777-9" title="Special:BookSources/0-387-94777-9"><bdi>0-387-94777-9</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Prime+Numbers%3A+A+Computational+Perspective&amp;rft.place=New+York&amp;rft.pub=Springer&amp;rft.date=2001&amp;rft.isbn=0-387-94777-9&amp;rft.aulast=Crandall&amp;rft.aufirst=Richard&amp;rft.au=Pomerance%2C+Carl&amp;rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3D8KZ4RQufxhYC&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGrahamKnuthPatashnik1994" class="citation cs2">Graham, Ronald L.; Knuth, Donald E.; Patashnik, Oren (1994), <i>Concrete Mathematics</i>, Reading Ma.: Addison-Wesley, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-201-55802-5" title="Special:BookSources/0-201-55802-5"><bdi>0-201-55802-5</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Concrete+Mathematics&amp;rft.place=Reading+Ma.&amp;rft.pub=Addison-Wesley&amp;rft.date=1994&amp;rft.isbn=0-201-55802-5&amp;rft.aulast=Graham&amp;rft.aufirst=Ronald+L.&amp;rft.au=Knuth%2C+Donald+E.&amp;rft.au=Patashnik%2C+Oren&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHardyWright1980" class="citation cs2">Hardy, G. H.; Wright, E. M. (1980), <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/introductiontoth00hard"><i>An Introduction to the Theory of Numbers (Fifth edition)</i></a></span>, Oxford: <a href="/wiki/Oxford_University_Press" title="Oxford University Press">Oxford University Press</a>, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-19-853171-5" title="Special:BookSources/978-0-19-853171-5"><bdi>978-0-19-853171-5</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=An+Introduction+to+the+Theory+of+Numbers+%28Fifth+edition%29&amp;rft.place=Oxford&amp;rft.pub=Oxford+University+Press&amp;rft.date=1980&amp;rft.isbn=978-0-19-853171-5&amp;rft.aulast=Hardy&amp;rft.aufirst=G.+H.&amp;rft.au=Wright%2C+E.+M.&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fintroductiontoth00hard&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li> <li>Nicholas J. Higham, <i>Handbook of writing for the mathematical sciences</i>, SIAM. <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-89871-420-6" title="Special:BookSources/0-89871-420-6">0-89871-420-6</a>, p.&#160;25</li> <li><a href="/wiki/International_Organization_for_Standardization" title="International Organization for Standardization">ISO</a>/<a href="/wiki/International_Electrotechnical_Commission" title="International Electrotechnical Commission">IEC</a>. <i>ISO/IEC 9899::1999(E): Programming languages — C</i> (2nd ed), 1999; Section 6.3.1.4, p.&#160;43.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIverson1962" class="citation cs2">Iverson, Kenneth E. (1962), <i>A Programming Language</i>, Wiley</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=A+Programming+Language&amp;rft.pub=Wiley&amp;rft.date=1962&amp;rft.aulast=Iverson&amp;rft.aufirst=Kenneth+E.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFLemmermeyer2000" class="citation cs2">Lemmermeyer, Franz (2000), <i>Reciprocity Laws: from Euler to Eisenstein</i>, Berlin: <a href="/wiki/Springer_Science%2BBusiness_Media" title="Springer Science+Business Media">Springer</a>, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/3-540-66957-4" title="Special:BookSources/3-540-66957-4"><bdi>3-540-66957-4</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Reciprocity+Laws%3A+from+Euler+to+Eisenstein&amp;rft.place=Berlin&amp;rft.pub=Springer&amp;rft.date=2000&amp;rft.isbn=3-540-66957-4&amp;rft.aulast=Lemmermeyer&amp;rft.aufirst=Franz&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRamanujan2000" class="citation cs2">Ramanujan, Srinivasa (2000), <i>Collected Papers</i>, Providence RI: AMS / Chelsea, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-8218-2076-6" title="Special:BookSources/978-0-8218-2076-6"><bdi>978-0-8218-2076-6</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Collected+Papers&amp;rft.place=Providence+RI&amp;rft.pub=AMS+%2F+Chelsea&amp;rft.date=2000&amp;rft.isbn=978-0-8218-2076-6&amp;rft.aulast=Ramanujan&amp;rft.aufirst=Srinivasa&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRibenboim1996" class="citation cs2">Ribenboim, Paulo (1996), <i>The New Book of Prime Number Records</i>, New York: Springer, <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-387-94457-5" title="Special:BookSources/0-387-94457-5"><bdi>0-387-94457-5</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=The+New+Book+of+Prime+Number+Records&amp;rft.place=New+York&amp;rft.pub=Springer&amp;rft.date=1996&amp;rft.isbn=0-387-94457-5&amp;rft.aulast=Ribenboim&amp;rft.aufirst=Paulo&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li> <li>Michael Sullivan. <i>Precalculus</i>, 8th edition, p.&#160;86</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTitchmarshHeath-Brown1986" class="citation cs2">Titchmarsh, Edward Charles; Heath-Brown, David Rodney ("Roger") (1986), <i>The Theory of the Riemann Zeta-function</i> (2nd&#160;ed.), Oxford: Oxford U. P., <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-19-853369-1" title="Special:BookSources/0-19-853369-1"><bdi>0-19-853369-1</bdi></a></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=The+Theory+of+the+Riemann+Zeta-function&amp;rft.place=Oxford&amp;rft.edition=2nd&amp;rft.pub=Oxford+U.+P.&amp;rft.date=1986&amp;rft.isbn=0-19-853369-1&amp;rft.aulast=Titchmarsh&amp;rft.aufirst=Edward+Charles&amp;rft.au=Heath-Brown%2C+David+Rodney+%28%22Roger%22%29&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li></ul> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Floor_and_ceiling_functions&amp;action=edit&amp;section=26" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1235681985">.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}</style><style data-mw-deduplicate="TemplateStyles:r1237033735">@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}</style><div class="side-box side-box-right plainlinks sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}</style> <div class="side-box-flex"> <div class="side-box-image"><span class="noviewer" typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/30px-Commons-logo.svg.png" decoding="async" width="30" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/45px-Commons-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/59px-Commons-logo.svg.png 2x" data-file-width="1024" data-file-height="1376" /></span></span></div> <div class="side-box-text plainlist">Wikimedia Commons has media related to <span style="font-weight: bold; font-style: italic;"><a href="https://commons.wikimedia.org/wiki/Category:Floor_and_ceiling" class="extiw" title="commons:Category:Floor and ceiling">Floor and ceiling functions</a></span>.</div></div> </div> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation cs2"><a rel="nofollow" class="external text" href="https://www.encyclopediaofmath.org/index.php?title=Floor_function">"Floor function"</a>, <i><a href="/wiki/Encyclopedia_of_Mathematics" title="Encyclopedia of Mathematics">Encyclopedia of Mathematics</a></i>, <a href="/wiki/European_Mathematical_Society" title="European Mathematical Society">EMS Press</a>, 2001 [1994]</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=Floor+function&amp;rft.btitle=Encyclopedia+of+Mathematics&amp;rft.pub=EMS+Press&amp;rft.date=2001&amp;rft_id=https%3A%2F%2Fwww.encyclopediaofmath.org%2Findex.php%3Ftitle%3DFloor_function&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></li> <li>Štefan Porubský, <a rel="nofollow" class="external text" href="http://www.cs.cas.cz/portal/AlgoMath/NumberTheory/ArithmeticFunctions/IntegerRoundingFunctions.htm">"Integer rounding functions"</a>, <i>Interactive Information Portal for Algorithmic Mathematics</i>, Institute of Computer Science of the Czech Academy of Sciences, Prague, Czech Republic, retrieved 24 October 2008</li> <li><span class="citation mathworld" id="Reference-Mathworld-Floor_Function"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWeisstein" class="citation web cs1"><a href="/wiki/Eric_W._Weisstein" title="Eric W. Weisstein">Weisstein, Eric W.</a> <a rel="nofollow" class="external text" href="https://mathworld.wolfram.com/FloorFunction.html">"Floor Function"</a>. <i><a href="/wiki/MathWorld" title="MathWorld">MathWorld</a></i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=MathWorld&amp;rft.atitle=Floor+Function&amp;rft.au=Weisstein%2C+Eric+W.&amp;rft_id=https%3A%2F%2Fmathworld.wolfram.com%2FFloorFunction.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span></li> <li><span class="citation mathworld" id="Reference-Mathworld-Ceiling_Function"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWeisstein" class="citation web cs1"><a href="/wiki/Eric_W._Weisstein" title="Eric W. Weisstein">Weisstein, Eric W.</a> <a rel="nofollow" class="external text" href="https://mathworld.wolfram.com/CeilingFunction.html">"Ceiling Function"</a>. <i><a href="/wiki/MathWorld" title="MathWorld">MathWorld</a></i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=MathWorld&amp;rft.atitle=Ceiling+Function&amp;rft.au=Weisstein%2C+Eric+W.&amp;rft_id=https%3A%2F%2Fmathworld.wolfram.com%2FCeilingFunction.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AFloor+and+ceiling+functions" class="Z3988"></span></span></li></ul> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐57488d5c7d‐469t8 Cached time: 20241128020753 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.900 seconds Real time usage: 1.204 seconds Preprocessor visited node count: 7744/1000000 Post‐expand include size: 78032/2097152 bytes Template argument size: 9527/2097152 bytes Highest expansion depth: 23/100 Expensive parser function count: 5/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 118429/5000000 bytes Lua time usage: 0.454/10.000 seconds Lua memory usage: 21746211/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 869.316 1 -total 27.87% 242.266 1 Template:Reflist 14.63% 127.174 17 Template:Cite_web 13.14% 114.230 1 Template:Lang 12.64% 109.893 1 Template:Short_description 8.69% 75.509 4 Template:Unichar 8.09% 70.352 4 Template:Unichar/main 7.74% 67.253 2 Template:Isbn 7.72% 67.121 2 Template:Pagetype 6.54% 56.859 3 Template:Catalog_lookup_link --> <!-- Saved in parser cache with key enwiki:pcache:idhash:54267-0!canonical and timestamp 20241128020753 and revision id 1252833377. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Floor_and_ceiling_functions&amp;oldid=1252833377">https://en.wikipedia.org/w/index.php?title=Floor_and_ceiling_functions&amp;oldid=1252833377</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Special_functions" title="Category:Special functions">Special functions</a></li><li><a href="/wiki/Category:Mathematical_notation" title="Category:Mathematical notation">Mathematical notation</a></li><li><a href="/wiki/Category:Unary_operations" title="Category:Unary operations">Unary operations</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:Use_dmy_dates_from_May_2023" title="Category:Use dmy dates from May 2023">Use dmy dates from May 2023</a></li><li><a href="/wiki/Category:Articles_containing_French-language_text" title="Category:Articles containing French-language text">Articles containing French-language text</a></li><li><a href="/wiki/Category:All_articles_lacking_reliable_references" title="Category:All articles lacking reliable references">All articles lacking reliable references</a></li><li><a href="/wiki/Category:Articles_lacking_reliable_references_from_February_2022" title="Category:Articles lacking reliable references from February 2022">Articles lacking reliable references from February 2022</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_November_2018" title="Category:Articles with unsourced statements from November 2018">Articles with unsourced statements from November 2018</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_March_2019" title="Category:Articles with unsourced statements from March 2019">Articles with unsourced statements from March 2019</a></li><li><a href="/wiki/Category:Commons_category_link_is_on_Wikidata" title="Category:Commons category link is on Wikidata">Commons category link is on Wikidata</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 23 October 2024, at 03:53<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Floor_and_ceiling_functions&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-57488d5c7d-756dx","wgBackendResponseTime":251,"wgPageParseReport":{"limitreport":{"cputime":"0.900","walltime":"1.204","ppvisitednodes":{"value":7744,"limit":1000000},"postexpandincludesize":{"value":78032,"limit":2097152},"templateargumentsize":{"value":9527,"limit":2097152},"expansiondepth":{"value":23,"limit":100},"expensivefunctioncount":{"value":5,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":118429,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 869.316 1 -total"," 27.87% 242.266 1 Template:Reflist"," 14.63% 127.174 17 Template:Cite_web"," 13.14% 114.230 1 Template:Lang"," 12.64% 109.893 1 Template:Short_description"," 8.69% 75.509 4 Template:Unichar"," 8.09% 70.352 4 Template:Unichar/main"," 7.74% 67.253 2 Template:Isbn"," 7.72% 67.121 2 Template:Pagetype"," 6.54% 56.859 3 Template:Catalog_lookup_link"]},"scribunto":{"limitreport-timeusage":{"value":"0.454","limit":"10.000"},"limitreport-memusage":{"value":21746211,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-57488d5c7d-469t8","timestamp":"20241128020753","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Floor and ceiling functions","url":"https:\/\/en.wikipedia.org\/wiki\/Floor_and_ceiling_functions","sameAs":"http:\/\/www.wikidata.org\/entity\/Q215193","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q215193","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2002-05-30T22:59:48Z","dateModified":"2024-10-23T03:53:14Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/e\/e1\/Floor_function.svg","headline":"functions of a real returning respectively the largest smaller and the smallest larger integer"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10