Floor and Ceiling Functions - Math is Fun
文章推薦指數: 80 %
The floor and ceiling functions give us the nearest integer up or down. Example: What is the floor and ceiling of 2.31? Floor and Ceiling function. The Floor of ... Advanced ShowAds HideAds AboutAds FloorandCeilingFunctions Thefloorandceilingfunctionsgiveusthenearestintegerupordown. Example:Whatisthefloorandceilingof2.31? TheFloorof2.31is2 TheCeilingof2.31is3 FloorandCeilingofIntegers Whatifwewantthefloororceilingofanumberthatisalreadyaninteger? That'seasy:nochange! Example:Whatisthefloorandceilingof5? TheFloorof5is5 TheCeilingof5is5 Herearesomeexamplevaluesforyou: x Floor Ceiling −1.1 −2 −1 0 0 0 1.01 1 2 2.9 2 3 3 3 3 Symbols Thesymbolsforfloorandceilingarelikethesquarebrackets[]withthetoporbottompartmissing: ButIprefertousethewordform:floor(x)andceil(x) Definitions Howdowegivethisaformaldefinition? Example:Howdowedefinethefloorof2.31? Well,ithastobeaninteger... ...andithastobelessthan(ormaybeequalto)2.31,right? 2islessthan2.31... but1isalsolessthan2.31, andsois0,and-1,-2,-3,etc. Ohno!Therearelotsofintegerslessthan2.31. Sowhichonedowechoose? Choosethegreatestone(whichis2inthiscase) Soweget: Thegreatestintegerthatislessthan(orequalto)2.31is2 Whichleadstoourdefinition: FloorFunction:thegreatestintegerthatislessthanorequaltox LikewiseforCeiling: CeilingFunction:theleastintegerthatisgreaterthanorequaltox AsAGraph TheFloorFunctionisthiscurious"step"function(likeaninfinitestaircase): TheFloorFunction Asoliddotmeans"including"andanopendotmeans"notincluding". Example:atx=2wemeet: anopendotaty=1(soitdoesnotincludex=2), andasoliddotaty=2(whichdoesincludex=2) sotheanswerisy=2 AndthisistheCeilingFunction: TheCeilingFunction The"Int"Function The"Int"function(shortfor"integer")islikethe"Floor"function,BUTsomecalculatorsandcomputerprogramsshowdifferentresultswhengivennegativenumbers: Somesayint(−3.65)=−4(thesameastheFloorfunction) Otherssayint(−3.65)=−3(theneighbouringintegerclosesttozero,or"justthrowawaythe.65") Sobecarefulwiththisfunction! The"Frac"Function WiththeFloorFunction,we"throwaway"thefractionalpart.Thatpartiscalledthe"frac"or"fractionalpart"function: frac(x)=x−floor(x) Itlookslikeasawtooth: TheFracFunction Example:whatisfrac(3.65)? frac(x)=x−floor(x) So:frac(3.65)=3.65−floor(3.65)=3.65−3=0.65 Example:whatisfrac(−3.65)? frac(x)=x−floor(x) So:frac(−3.65)=(−3.65)−floor(−3.65)=(−3.65)−(−4)=−3.65+4=0.35 BUTmanycalculatorsandcomputerprogramsusefrac(x)=x−int(x),andsotheirresultdependsonhowtheycalculateint(x): Somesayfrac(−3.65)=0.35i.e−3.65−(−4) Otherssayfrac(−3.65)=−0.65i.e.−3.65−(−3) Sobecarefulusingthisfunctionwithnegativevalues. CommonFunctionsReferenceSetsIndex Copyright©2017MathsIsFun.com
延伸文章資訊
- 1Floor and Ceiling Functions - Math24.net
Definitions. Let be a real number. The floor function of denoted by or is defined to be the great...
- 2Floor and Ceiling Functions - Math is Fun
The floor and ceiling functions give us the nearest integer up or down. Example: What is the floo...
- 3EXCEL:你知道CEILING、FLOOR是什麼函數嗎 ... - 每日頭條
今天我們介紹下CEILING、FLOOR函數的意義和用法吧1、CEILING函數CEILING。如significance為3,則是向上捨入到最接近3的倍數。
- 4Floor and Ceiling Functions - Maple Help - Maplesoft
The floor of a real number x, denoted by , is defined to be the largest integer no larger than x....
- 5Floor and ceiling functions - Wikipedia
In mathematics and computer science, the floor function is the function that takes as input a rea...