libc.info-8 212 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240
  1. This is libc.info, produced by makeinfo version 5.2 from libc.texinfo.
  2. This file documents the GNU C Library.
  3. This is ‘The GNU C Library Reference Manual’, for version 2.25.
  4. Copyright © 1993–2017 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3 or
  7. any later version published by the Free Software Foundation; with the
  8. Invariant Sections being “Free Software Needs Free Documentation” and
  9. “GNU Lesser General Public License”, the Front-Cover texts being “A GNU
  10. Manual”, and with the Back-Cover Texts as in (a) below. A copy of the
  11. license is included in the section entitled "GNU Free Documentation
  12. License".
  13. (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and
  14. modify this GNU manual. Buying copies from the FSF supports it in
  15. developing GNU and promoting software freedom.”
  16. INFO-DIR-SECTION Software libraries
  17. START-INFO-DIR-ENTRY
  18. * Libc: (libc). C library.
  19. END-INFO-DIR-ENTRY
  20. INFO-DIR-SECTION GNU C library functions and macros
  21. START-INFO-DIR-ENTRY
  22. * a64l: (libc)Encode Binary Data.
  23. * abort: (libc)Aborting a Program.
  24. * abs: (libc)Absolute Value.
  25. * accept: (libc)Accepting Connections.
  26. * access: (libc)Testing File Access.
  27. * acosf: (libc)Inverse Trig Functions.
  28. * acoshf: (libc)Hyperbolic Functions.
  29. * acosh: (libc)Hyperbolic Functions.
  30. * acoshl: (libc)Hyperbolic Functions.
  31. * acos: (libc)Inverse Trig Functions.
  32. * acosl: (libc)Inverse Trig Functions.
  33. * addmntent: (libc)mtab.
  34. * addseverity: (libc)Adding Severity Classes.
  35. * adjtime: (libc)High-Resolution Calendar.
  36. * adjtimex: (libc)High-Resolution Calendar.
  37. * aio_cancel64: (libc)Cancel AIO Operations.
  38. * aio_cancel: (libc)Cancel AIO Operations.
  39. * aio_error64: (libc)Status of AIO Operations.
  40. * aio_error: (libc)Status of AIO Operations.
  41. * aio_fsync64: (libc)Synchronizing AIO Operations.
  42. * aio_fsync: (libc)Synchronizing AIO Operations.
  43. * aio_init: (libc)Configuration of AIO.
  44. * aio_read64: (libc)Asynchronous Reads/Writes.
  45. * aio_read: (libc)Asynchronous Reads/Writes.
  46. * aio_return64: (libc)Status of AIO Operations.
  47. * aio_return: (libc)Status of AIO Operations.
  48. * aio_suspend64: (libc)Synchronizing AIO Operations.
  49. * aio_suspend: (libc)Synchronizing AIO Operations.
  50. * aio_write64: (libc)Asynchronous Reads/Writes.
  51. * aio_write: (libc)Asynchronous Reads/Writes.
  52. * alarm: (libc)Setting an Alarm.
  53. * aligned_alloc: (libc)Aligned Memory Blocks.
  54. * alloca: (libc)Variable Size Automatic.
  55. * alphasort64: (libc)Scanning Directory Content.
  56. * alphasort: (libc)Scanning Directory Content.
  57. * ALTWERASE: (libc)Local Modes.
  58. * ARG_MAX: (libc)General Limits.
  59. * argp_error: (libc)Argp Helper Functions.
  60. * ARGP_ERR_UNKNOWN: (libc)Argp Parser Functions.
  61. * argp_failure: (libc)Argp Helper Functions.
  62. * argp_help: (libc)Argp Help.
  63. * argp_parse: (libc)Argp.
  64. * argp_state_help: (libc)Argp Helper Functions.
  65. * argp_usage: (libc)Argp Helper Functions.
  66. * argz_add: (libc)Argz Functions.
  67. * argz_add_sep: (libc)Argz Functions.
  68. * argz_append: (libc)Argz Functions.
  69. * argz_count: (libc)Argz Functions.
  70. * argz_create: (libc)Argz Functions.
  71. * argz_create_sep: (libc)Argz Functions.
  72. * argz_delete: (libc)Argz Functions.
  73. * argz_extract: (libc)Argz Functions.
  74. * argz_insert: (libc)Argz Functions.
  75. * argz_next: (libc)Argz Functions.
  76. * argz_replace: (libc)Argz Functions.
  77. * argz_stringify: (libc)Argz Functions.
  78. * asctime: (libc)Formatting Calendar Time.
  79. * asctime_r: (libc)Formatting Calendar Time.
  80. * asinf: (libc)Inverse Trig Functions.
  81. * asinhf: (libc)Hyperbolic Functions.
  82. * asinh: (libc)Hyperbolic Functions.
  83. * asinhl: (libc)Hyperbolic Functions.
  84. * asin: (libc)Inverse Trig Functions.
  85. * asinl: (libc)Inverse Trig Functions.
  86. * asprintf: (libc)Dynamic Output.
  87. * assert: (libc)Consistency Checking.
  88. * assert_perror: (libc)Consistency Checking.
  89. * atan2f: (libc)Inverse Trig Functions.
  90. * atan2: (libc)Inverse Trig Functions.
  91. * atan2l: (libc)Inverse Trig Functions.
  92. * atanf: (libc)Inverse Trig Functions.
  93. * atanhf: (libc)Hyperbolic Functions.
  94. * atanh: (libc)Hyperbolic Functions.
  95. * atanhl: (libc)Hyperbolic Functions.
  96. * atan: (libc)Inverse Trig Functions.
  97. * atanl: (libc)Inverse Trig Functions.
  98. * atexit: (libc)Cleanups on Exit.
  99. * atof: (libc)Parsing of Floats.
  100. * atoi: (libc)Parsing of Integers.
  101. * atol: (libc)Parsing of Integers.
  102. * atoll: (libc)Parsing of Integers.
  103. * backtrace: (libc)Backtraces.
  104. * backtrace_symbols_fd: (libc)Backtraces.
  105. * backtrace_symbols: (libc)Backtraces.
  106. * basename: (libc)Finding Tokens in a String.
  107. * basename: (libc)Finding Tokens in a String.
  108. * BC_BASE_MAX: (libc)Utility Limits.
  109. * BC_DIM_MAX: (libc)Utility Limits.
  110. * bcmp: (libc)String/Array Comparison.
  111. * bcopy: (libc)Copying Strings and Arrays.
  112. * BC_SCALE_MAX: (libc)Utility Limits.
  113. * BC_STRING_MAX: (libc)Utility Limits.
  114. * bind: (libc)Setting Address.
  115. * bind_textdomain_codeset: (libc)Charset conversion in gettext.
  116. * bindtextdomain: (libc)Locating gettext catalog.
  117. * BRKINT: (libc)Input Modes.
  118. * brk: (libc)Resizing the Data Segment.
  119. * bsearch: (libc)Array Search Function.
  120. * btowc: (libc)Converting a Character.
  121. * BUFSIZ: (libc)Controlling Buffering.
  122. * bzero: (libc)Copying Strings and Arrays.
  123. * cabsf: (libc)Absolute Value.
  124. * cabs: (libc)Absolute Value.
  125. * cabsl: (libc)Absolute Value.
  126. * cacosf: (libc)Inverse Trig Functions.
  127. * cacoshf: (libc)Hyperbolic Functions.
  128. * cacosh: (libc)Hyperbolic Functions.
  129. * cacoshl: (libc)Hyperbolic Functions.
  130. * cacos: (libc)Inverse Trig Functions.
  131. * cacosl: (libc)Inverse Trig Functions.
  132. * calloc: (libc)Allocating Cleared Space.
  133. * canonicalize_file_name: (libc)Symbolic Links.
  134. * canonicalizef: (libc)FP Bit Twiddling.
  135. * canonicalize: (libc)FP Bit Twiddling.
  136. * canonicalizel: (libc)FP Bit Twiddling.
  137. * cargf: (libc)Operations on Complex.
  138. * carg: (libc)Operations on Complex.
  139. * cargl: (libc)Operations on Complex.
  140. * casinf: (libc)Inverse Trig Functions.
  141. * casinhf: (libc)Hyperbolic Functions.
  142. * casinh: (libc)Hyperbolic Functions.
  143. * casinhl: (libc)Hyperbolic Functions.
  144. * casin: (libc)Inverse Trig Functions.
  145. * casinl: (libc)Inverse Trig Functions.
  146. * catanf: (libc)Inverse Trig Functions.
  147. * catanhf: (libc)Hyperbolic Functions.
  148. * catanh: (libc)Hyperbolic Functions.
  149. * catanhl: (libc)Hyperbolic Functions.
  150. * catan: (libc)Inverse Trig Functions.
  151. * catanl: (libc)Inverse Trig Functions.
  152. * catclose: (libc)The catgets Functions.
  153. * catgets: (libc)The catgets Functions.
  154. * catopen: (libc)The catgets Functions.
  155. * cbc_crypt: (libc)DES Encryption.
  156. * cbrtf: (libc)Exponents and Logarithms.
  157. * cbrt: (libc)Exponents and Logarithms.
  158. * cbrtl: (libc)Exponents and Logarithms.
  159. * ccosf: (libc)Trig Functions.
  160. * ccoshf: (libc)Hyperbolic Functions.
  161. * ccosh: (libc)Hyperbolic Functions.
  162. * ccoshl: (libc)Hyperbolic Functions.
  163. * ccos: (libc)Trig Functions.
  164. * ccosl: (libc)Trig Functions.
  165. * CCTS_OFLOW: (libc)Control Modes.
  166. * ceilf: (libc)Rounding Functions.
  167. * ceil: (libc)Rounding Functions.
  168. * ceill: (libc)Rounding Functions.
  169. * cexpf: (libc)Exponents and Logarithms.
  170. * cexp: (libc)Exponents and Logarithms.
  171. * cexpl: (libc)Exponents and Logarithms.
  172. * cfgetispeed: (libc)Line Speed.
  173. * cfgetospeed: (libc)Line Speed.
  174. * cfmakeraw: (libc)Noncanonical Input.
  175. * cfree: (libc)Freeing after Malloc.
  176. * cfsetispeed: (libc)Line Speed.
  177. * cfsetospeed: (libc)Line Speed.
  178. * cfsetspeed: (libc)Line Speed.
  179. * chdir: (libc)Working Directory.
  180. * CHILD_MAX: (libc)General Limits.
  181. * chmod: (libc)Setting Permissions.
  182. * chown: (libc)File Owner.
  183. * CIGNORE: (libc)Control Modes.
  184. * cimagf: (libc)Operations on Complex.
  185. * cimag: (libc)Operations on Complex.
  186. * cimagl: (libc)Operations on Complex.
  187. * clearenv: (libc)Environment Access.
  188. * clearerr: (libc)Error Recovery.
  189. * clearerr_unlocked: (libc)Error Recovery.
  190. * CLK_TCK: (libc)Processor Time.
  191. * CLOCAL: (libc)Control Modes.
  192. * clock: (libc)CPU Time.
  193. * CLOCKS_PER_SEC: (libc)CPU Time.
  194. * clog10f: (libc)Exponents and Logarithms.
  195. * clog10: (libc)Exponents and Logarithms.
  196. * clog10l: (libc)Exponents and Logarithms.
  197. * clogf: (libc)Exponents and Logarithms.
  198. * clog: (libc)Exponents and Logarithms.
  199. * clogl: (libc)Exponents and Logarithms.
  200. * closedir: (libc)Reading/Closing Directory.
  201. * close: (libc)Opening and Closing Files.
  202. * closelog: (libc)closelog.
  203. * COLL_WEIGHTS_MAX: (libc)Utility Limits.
  204. * _Complex_I: (libc)Complex Numbers.
  205. * confstr: (libc)String Parameters.
  206. * conjf: (libc)Operations on Complex.
  207. * conj: (libc)Operations on Complex.
  208. * conjl: (libc)Operations on Complex.
  209. * connect: (libc)Connecting.
  210. * copysignf: (libc)FP Bit Twiddling.
  211. * copysign: (libc)FP Bit Twiddling.
  212. * copysignl: (libc)FP Bit Twiddling.
  213. * cosf: (libc)Trig Functions.
  214. * coshf: (libc)Hyperbolic Functions.
  215. * cosh: (libc)Hyperbolic Functions.
  216. * coshl: (libc)Hyperbolic Functions.
  217. * cos: (libc)Trig Functions.
  218. * cosl: (libc)Trig Functions.
  219. * cpowf: (libc)Exponents and Logarithms.
  220. * cpow: (libc)Exponents and Logarithms.
  221. * cpowl: (libc)Exponents and Logarithms.
  222. * cprojf: (libc)Operations on Complex.
  223. * cproj: (libc)Operations on Complex.
  224. * cprojl: (libc)Operations on Complex.
  225. * CPU_CLR: (libc)CPU Affinity.
  226. * CPU_ISSET: (libc)CPU Affinity.
  227. * CPU_SET: (libc)CPU Affinity.
  228. * CPU_SETSIZE: (libc)CPU Affinity.
  229. * CPU_ZERO: (libc)CPU Affinity.
  230. * CREAD: (libc)Control Modes.
  231. * crealf: (libc)Operations on Complex.
  232. * creal: (libc)Operations on Complex.
  233. * creall: (libc)Operations on Complex.
  234. * creat64: (libc)Opening and Closing Files.
  235. * creat: (libc)Opening and Closing Files.
  236. * CRTS_IFLOW: (libc)Control Modes.
  237. * crypt: (libc)crypt.
  238. * crypt_r: (libc)crypt.
  239. * CS5: (libc)Control Modes.
  240. * CS6: (libc)Control Modes.
  241. * CS7: (libc)Control Modes.
  242. * CS8: (libc)Control Modes.
  243. * csinf: (libc)Trig Functions.
  244. * csinhf: (libc)Hyperbolic Functions.
  245. * csinh: (libc)Hyperbolic Functions.
  246. * csinhl: (libc)Hyperbolic Functions.
  247. * csin: (libc)Trig Functions.
  248. * csinl: (libc)Trig Functions.
  249. * CSIZE: (libc)Control Modes.
  250. * csqrtf: (libc)Exponents and Logarithms.
  251. * csqrt: (libc)Exponents and Logarithms.
  252. * csqrtl: (libc)Exponents and Logarithms.
  253. * CSTOPB: (libc)Control Modes.
  254. * ctanf: (libc)Trig Functions.
  255. * ctanhf: (libc)Hyperbolic Functions.
  256. * ctanh: (libc)Hyperbolic Functions.
  257. * ctanhl: (libc)Hyperbolic Functions.
  258. * ctan: (libc)Trig Functions.
  259. * ctanl: (libc)Trig Functions.
  260. * ctermid: (libc)Identifying the Terminal.
  261. * ctime: (libc)Formatting Calendar Time.
  262. * ctime_r: (libc)Formatting Calendar Time.
  263. * cuserid: (libc)Who Logged In.
  264. * dcgettext: (libc)Translation with gettext.
  265. * dcngettext: (libc)Advanced gettext functions.
  266. * DES_FAILED: (libc)DES Encryption.
  267. * des_setparity: (libc)DES Encryption.
  268. * dgettext: (libc)Translation with gettext.
  269. * difftime: (libc)Elapsed Time.
  270. * dirfd: (libc)Opening a Directory.
  271. * dirname: (libc)Finding Tokens in a String.
  272. * div: (libc)Integer Division.
  273. * dngettext: (libc)Advanced gettext functions.
  274. * drand48: (libc)SVID Random.
  275. * drand48_r: (libc)SVID Random.
  276. * dremf: (libc)Remainder Functions.
  277. * drem: (libc)Remainder Functions.
  278. * dreml: (libc)Remainder Functions.
  279. * DTTOIF: (libc)Directory Entries.
  280. * dup2: (libc)Duplicating Descriptors.
  281. * dup: (libc)Duplicating Descriptors.
  282. * E2BIG: (libc)Error Codes.
  283. * EACCES: (libc)Error Codes.
  284. * EADDRINUSE: (libc)Error Codes.
  285. * EADDRNOTAVAIL: (libc)Error Codes.
  286. * EADV: (libc)Error Codes.
  287. * EAFNOSUPPORT: (libc)Error Codes.
  288. * EAGAIN: (libc)Error Codes.
  289. * EALREADY: (libc)Error Codes.
  290. * EAUTH: (libc)Error Codes.
  291. * EBACKGROUND: (libc)Error Codes.
  292. * EBADE: (libc)Error Codes.
  293. * EBADFD: (libc)Error Codes.
  294. * EBADF: (libc)Error Codes.
  295. * EBADMSG: (libc)Error Codes.
  296. * EBADR: (libc)Error Codes.
  297. * EBADRPC: (libc)Error Codes.
  298. * EBADRQC: (libc)Error Codes.
  299. * EBADSLT: (libc)Error Codes.
  300. * EBFONT: (libc)Error Codes.
  301. * EBUSY: (libc)Error Codes.
  302. * ECANCELED: (libc)Error Codes.
  303. * ecb_crypt: (libc)DES Encryption.
  304. * ECHILD: (libc)Error Codes.
  305. * ECHOCTL: (libc)Local Modes.
  306. * ECHOE: (libc)Local Modes.
  307. * ECHOKE: (libc)Local Modes.
  308. * ECHOK: (libc)Local Modes.
  309. * ECHO: (libc)Local Modes.
  310. * ECHONL: (libc)Local Modes.
  311. * ECHOPRT: (libc)Local Modes.
  312. * ECHRNG: (libc)Error Codes.
  313. * ECOMM: (libc)Error Codes.
  314. * ECONNABORTED: (libc)Error Codes.
  315. * ECONNREFUSED: (libc)Error Codes.
  316. * ECONNRESET: (libc)Error Codes.
  317. * ecvt: (libc)System V Number Conversion.
  318. * ecvt_r: (libc)System V Number Conversion.
  319. * EDEADLK: (libc)Error Codes.
  320. * EDEADLOCK: (libc)Error Codes.
  321. * EDESTADDRREQ: (libc)Error Codes.
  322. * EDIED: (libc)Error Codes.
  323. * ED: (libc)Error Codes.
  324. * EDOM: (libc)Error Codes.
  325. * EDOTDOT: (libc)Error Codes.
  326. * EDQUOT: (libc)Error Codes.
  327. * EEXIST: (libc)Error Codes.
  328. * EFAULT: (libc)Error Codes.
  329. * EFBIG: (libc)Error Codes.
  330. * EFTYPE: (libc)Error Codes.
  331. * EGRATUITOUS: (libc)Error Codes.
  332. * EGREGIOUS: (libc)Error Codes.
  333. * EHOSTDOWN: (libc)Error Codes.
  334. * EHOSTUNREACH: (libc)Error Codes.
  335. * EHWPOISON: (libc)Error Codes.
  336. * EIDRM: (libc)Error Codes.
  337. * EIEIO: (libc)Error Codes.
  338. * EILSEQ: (libc)Error Codes.
  339. * EINPROGRESS: (libc)Error Codes.
  340. * EINTR: (libc)Error Codes.
  341. * EINVAL: (libc)Error Codes.
  342. * EIO: (libc)Error Codes.
  343. * EISCONN: (libc)Error Codes.
  344. * EISDIR: (libc)Error Codes.
  345. * EISNAM: (libc)Error Codes.
  346. * EKEYEXPIRED: (libc)Error Codes.
  347. * EKEYREJECTED: (libc)Error Codes.
  348. * EKEYREVOKED: (libc)Error Codes.
  349. * EL2HLT: (libc)Error Codes.
  350. * EL2NSYNC: (libc)Error Codes.
  351. * EL3HLT: (libc)Error Codes.
  352. * EL3RST: (libc)Error Codes.
  353. * ELIBACC: (libc)Error Codes.
  354. * ELIBBAD: (libc)Error Codes.
  355. * ELIBEXEC: (libc)Error Codes.
  356. * ELIBMAX: (libc)Error Codes.
  357. * ELIBSCN: (libc)Error Codes.
  358. * ELNRNG: (libc)Error Codes.
  359. * ELOOP: (libc)Error Codes.
  360. * EMEDIUMTYPE: (libc)Error Codes.
  361. * EMFILE: (libc)Error Codes.
  362. * EMLINK: (libc)Error Codes.
  363. * EMSGSIZE: (libc)Error Codes.
  364. * EMULTIHOP: (libc)Error Codes.
  365. * ENAMETOOLONG: (libc)Error Codes.
  366. * ENAVAIL: (libc)Error Codes.
  367. * encrypt: (libc)DES Encryption.
  368. * encrypt_r: (libc)DES Encryption.
  369. * endfsent: (libc)fstab.
  370. * endgrent: (libc)Scanning All Groups.
  371. * endhostent: (libc)Host Names.
  372. * endmntent: (libc)mtab.
  373. * endnetent: (libc)Networks Database.
  374. * endnetgrent: (libc)Lookup Netgroup.
  375. * endprotoent: (libc)Protocols Database.
  376. * endpwent: (libc)Scanning All Users.
  377. * endservent: (libc)Services Database.
  378. * endutent: (libc)Manipulating the Database.
  379. * endutxent: (libc)XPG Functions.
  380. * ENEEDAUTH: (libc)Error Codes.
  381. * ENETDOWN: (libc)Error Codes.
  382. * ENETRESET: (libc)Error Codes.
  383. * ENETUNREACH: (libc)Error Codes.
  384. * ENFILE: (libc)Error Codes.
  385. * ENOANO: (libc)Error Codes.
  386. * ENOBUFS: (libc)Error Codes.
  387. * ENOCSI: (libc)Error Codes.
  388. * ENODATA: (libc)Error Codes.
  389. * ENODEV: (libc)Error Codes.
  390. * ENOENT: (libc)Error Codes.
  391. * ENOEXEC: (libc)Error Codes.
  392. * ENOKEY: (libc)Error Codes.
  393. * ENOLCK: (libc)Error Codes.
  394. * ENOLINK: (libc)Error Codes.
  395. * ENOMEDIUM: (libc)Error Codes.
  396. * ENOMEM: (libc)Error Codes.
  397. * ENOMSG: (libc)Error Codes.
  398. * ENONET: (libc)Error Codes.
  399. * ENOPKG: (libc)Error Codes.
  400. * ENOPROTOOPT: (libc)Error Codes.
  401. * ENOSPC: (libc)Error Codes.
  402. * ENOSR: (libc)Error Codes.
  403. * ENOSTR: (libc)Error Codes.
  404. * ENOSYS: (libc)Error Codes.
  405. * ENOTBLK: (libc)Error Codes.
  406. * ENOTCONN: (libc)Error Codes.
  407. * ENOTDIR: (libc)Error Codes.
  408. * ENOTEMPTY: (libc)Error Codes.
  409. * ENOTNAM: (libc)Error Codes.
  410. * ENOTRECOVERABLE: (libc)Error Codes.
  411. * ENOTSOCK: (libc)Error Codes.
  412. * ENOTSUP: (libc)Error Codes.
  413. * ENOTTY: (libc)Error Codes.
  414. * ENOTUNIQ: (libc)Error Codes.
  415. * envz_add: (libc)Envz Functions.
  416. * envz_entry: (libc)Envz Functions.
  417. * envz_get: (libc)Envz Functions.
  418. * envz_merge: (libc)Envz Functions.
  419. * envz_remove: (libc)Envz Functions.
  420. * envz_strip: (libc)Envz Functions.
  421. * ENXIO: (libc)Error Codes.
  422. * EOF: (libc)EOF and Errors.
  423. * EOPNOTSUPP: (libc)Error Codes.
  424. * EOVERFLOW: (libc)Error Codes.
  425. * EOWNERDEAD: (libc)Error Codes.
  426. * EPERM: (libc)Error Codes.
  427. * EPFNOSUPPORT: (libc)Error Codes.
  428. * EPIPE: (libc)Error Codes.
  429. * EPROCLIM: (libc)Error Codes.
  430. * EPROCUNAVAIL: (libc)Error Codes.
  431. * EPROGMISMATCH: (libc)Error Codes.
  432. * EPROGUNAVAIL: (libc)Error Codes.
  433. * EPROTO: (libc)Error Codes.
  434. * EPROTONOSUPPORT: (libc)Error Codes.
  435. * EPROTOTYPE: (libc)Error Codes.
  436. * EQUIV_CLASS_MAX: (libc)Utility Limits.
  437. * erand48: (libc)SVID Random.
  438. * erand48_r: (libc)SVID Random.
  439. * ERANGE: (libc)Error Codes.
  440. * EREMCHG: (libc)Error Codes.
  441. * EREMOTEIO: (libc)Error Codes.
  442. * EREMOTE: (libc)Error Codes.
  443. * ERESTART: (libc)Error Codes.
  444. * erfcf: (libc)Special Functions.
  445. * erfc: (libc)Special Functions.
  446. * erfcl: (libc)Special Functions.
  447. * erff: (libc)Special Functions.
  448. * ERFKILL: (libc)Error Codes.
  449. * erf: (libc)Special Functions.
  450. * erfl: (libc)Special Functions.
  451. * EROFS: (libc)Error Codes.
  452. * ERPCMISMATCH: (libc)Error Codes.
  453. * err: (libc)Error Messages.
  454. * errno: (libc)Checking for Errors.
  455. * error_at_line: (libc)Error Messages.
  456. * error: (libc)Error Messages.
  457. * errx: (libc)Error Messages.
  458. * ESHUTDOWN: (libc)Error Codes.
  459. * ESOCKTNOSUPPORT: (libc)Error Codes.
  460. * ESPIPE: (libc)Error Codes.
  461. * ESRCH: (libc)Error Codes.
  462. * ESRMNT: (libc)Error Codes.
  463. * ESTALE: (libc)Error Codes.
  464. * ESTRPIPE: (libc)Error Codes.
  465. * ETIMEDOUT: (libc)Error Codes.
  466. * ETIME: (libc)Error Codes.
  467. * ETOOMANYREFS: (libc)Error Codes.
  468. * ETXTBSY: (libc)Error Codes.
  469. * EUCLEAN: (libc)Error Codes.
  470. * EUNATCH: (libc)Error Codes.
  471. * EUSERS: (libc)Error Codes.
  472. * EWOULDBLOCK: (libc)Error Codes.
  473. * EXDEV: (libc)Error Codes.
  474. * execle: (libc)Executing a File.
  475. * execl: (libc)Executing a File.
  476. * execlp: (libc)Executing a File.
  477. * execve: (libc)Executing a File.
  478. * execv: (libc)Executing a File.
  479. * execvp: (libc)Executing a File.
  480. * EXFULL: (libc)Error Codes.
  481. * EXIT_FAILURE: (libc)Exit Status.
  482. * exit: (libc)Normal Termination.
  483. * _exit: (libc)Termination Internals.
  484. * _Exit: (libc)Termination Internals.
  485. * EXIT_SUCCESS: (libc)Exit Status.
  486. * exp10f: (libc)Exponents and Logarithms.
  487. * exp10: (libc)Exponents and Logarithms.
  488. * exp10l: (libc)Exponents and Logarithms.
  489. * exp2f: (libc)Exponents and Logarithms.
  490. * exp2: (libc)Exponents and Logarithms.
  491. * exp2l: (libc)Exponents and Logarithms.
  492. * expf: (libc)Exponents and Logarithms.
  493. * exp: (libc)Exponents and Logarithms.
  494. * explicit_bzero: (libc)Erasing Sensitive Data.
  495. * expl: (libc)Exponents and Logarithms.
  496. * expm1f: (libc)Exponents and Logarithms.
  497. * expm1: (libc)Exponents and Logarithms.
  498. * expm1l: (libc)Exponents and Logarithms.
  499. * EXPR_NEST_MAX: (libc)Utility Limits.
  500. * fabsf: (libc)Absolute Value.
  501. * fabs: (libc)Absolute Value.
  502. * fabsl: (libc)Absolute Value.
  503. * __fbufsize: (libc)Controlling Buffering.
  504. * fchdir: (libc)Working Directory.
  505. * fchmod: (libc)Setting Permissions.
  506. * fchown: (libc)File Owner.
  507. * fcloseall: (libc)Closing Streams.
  508. * fclose: (libc)Closing Streams.
  509. * fcntl: (libc)Control Operations.
  510. * fcvt: (libc)System V Number Conversion.
  511. * fcvt_r: (libc)System V Number Conversion.
  512. * fdatasync: (libc)Synchronizing I/O.
  513. * FD_CLOEXEC: (libc)Descriptor Flags.
  514. * FD_CLR: (libc)Waiting for I/O.
  515. * fdimf: (libc)Misc FP Arithmetic.
  516. * fdim: (libc)Misc FP Arithmetic.
  517. * fdiml: (libc)Misc FP Arithmetic.
  518. * FD_ISSET: (libc)Waiting for I/O.
  519. * fdopendir: (libc)Opening a Directory.
  520. * fdopen: (libc)Descriptors and Streams.
  521. * FD_SET: (libc)Waiting for I/O.
  522. * FD_SETSIZE: (libc)Waiting for I/O.
  523. * F_DUPFD: (libc)Duplicating Descriptors.
  524. * FD_ZERO: (libc)Waiting for I/O.
  525. * feclearexcept: (libc)Status bit operations.
  526. * fedisableexcept: (libc)Control Functions.
  527. * feenableexcept: (libc)Control Functions.
  528. * fegetenv: (libc)Control Functions.
  529. * fegetexceptflag: (libc)Status bit operations.
  530. * fegetexcept: (libc)Control Functions.
  531. * fegetmode: (libc)Control Functions.
  532. * fegetround: (libc)Rounding.
  533. * feholdexcept: (libc)Control Functions.
  534. * feof: (libc)EOF and Errors.
  535. * feof_unlocked: (libc)EOF and Errors.
  536. * feraiseexcept: (libc)Status bit operations.
  537. * ferror: (libc)EOF and Errors.
  538. * ferror_unlocked: (libc)EOF and Errors.
  539. * fesetenv: (libc)Control Functions.
  540. * fesetexceptflag: (libc)Status bit operations.
  541. * fesetexcept: (libc)Status bit operations.
  542. * fesetmode: (libc)Control Functions.
  543. * fesetround: (libc)Rounding.
  544. * FE_SNANS_ALWAYS_SIGNAL: (libc)Infinity and NaN.
  545. * fetestexceptflag: (libc)Status bit operations.
  546. * fetestexcept: (libc)Status bit operations.
  547. * feupdateenv: (libc)Control Functions.
  548. * fflush: (libc)Flushing Buffers.
  549. * fflush_unlocked: (libc)Flushing Buffers.
  550. * fgetc: (libc)Character Input.
  551. * fgetc_unlocked: (libc)Character Input.
  552. * F_GETFD: (libc)Descriptor Flags.
  553. * F_GETFL: (libc)Getting File Status Flags.
  554. * fgetgrent: (libc)Scanning All Groups.
  555. * fgetgrent_r: (libc)Scanning All Groups.
  556. * F_GETLK: (libc)File Locks.
  557. * F_GETOWN: (libc)Interrupt Input.
  558. * fgetpos64: (libc)Portable Positioning.
  559. * fgetpos: (libc)Portable Positioning.
  560. * fgetpwent: (libc)Scanning All Users.
  561. * fgetpwent_r: (libc)Scanning All Users.
  562. * fgets: (libc)Line Input.
  563. * fgets_unlocked: (libc)Line Input.
  564. * fgetwc: (libc)Character Input.
  565. * fgetwc_unlocked: (libc)Character Input.
  566. * fgetws: (libc)Line Input.
  567. * fgetws_unlocked: (libc)Line Input.
  568. * FILENAME_MAX: (libc)Limits for Files.
  569. * fileno: (libc)Descriptors and Streams.
  570. * fileno_unlocked: (libc)Descriptors and Streams.
  571. * finitef: (libc)Floating Point Classes.
  572. * finite: (libc)Floating Point Classes.
  573. * finitel: (libc)Floating Point Classes.
  574. * __flbf: (libc)Controlling Buffering.
  575. * flockfile: (libc)Streams and Threads.
  576. * floorf: (libc)Rounding Functions.
  577. * floor: (libc)Rounding Functions.
  578. * floorl: (libc)Rounding Functions.
  579. * _flushlbf: (libc)Flushing Buffers.
  580. * FLUSHO: (libc)Local Modes.
  581. * fmaf: (libc)Misc FP Arithmetic.
  582. * fma: (libc)Misc FP Arithmetic.
  583. * fmal: (libc)Misc FP Arithmetic.
  584. * fmaxf: (libc)Misc FP Arithmetic.
  585. * fmax: (libc)Misc FP Arithmetic.
  586. * fmaxl: (libc)Misc FP Arithmetic.
  587. * fmaxmagf: (libc)Misc FP Arithmetic.
  588. * fmaxmag: (libc)Misc FP Arithmetic.
  589. * fmaxmagl: (libc)Misc FP Arithmetic.
  590. * fmemopen: (libc)String Streams.
  591. * fminf: (libc)Misc FP Arithmetic.
  592. * fmin: (libc)Misc FP Arithmetic.
  593. * fminl: (libc)Misc FP Arithmetic.
  594. * fminmagf: (libc)Misc FP Arithmetic.
  595. * fminmag: (libc)Misc FP Arithmetic.
  596. * fminmagl: (libc)Misc FP Arithmetic.
  597. * fmodf: (libc)Remainder Functions.
  598. * fmod: (libc)Remainder Functions.
  599. * fmodl: (libc)Remainder Functions.
  600. * fmtmsg: (libc)Printing Formatted Messages.
  601. * fnmatch: (libc)Wildcard Matching.
  602. * F_OFD_GETLK: (libc)Open File Description Locks.
  603. * F_OFD_SETLK: (libc)Open File Description Locks.
  604. * F_OFD_SETLKW: (libc)Open File Description Locks.
  605. * F_OK: (libc)Testing File Access.
  606. * fopen64: (libc)Opening Streams.
  607. * fopencookie: (libc)Streams and Cookies.
  608. * fopen: (libc)Opening Streams.
  609. * FOPEN_MAX: (libc)Opening Streams.
  610. * fork: (libc)Creating a Process.
  611. * forkpty: (libc)Pseudo-Terminal Pairs.
  612. * fpathconf: (libc)Pathconf.
  613. * fpclassify: (libc)Floating Point Classes.
  614. * __fpending: (libc)Controlling Buffering.
  615. * FP_ILOGB0: (libc)Exponents and Logarithms.
  616. * FP_ILOGBNAN: (libc)Exponents and Logarithms.
  617. * FP_LLOGB0: (libc)Exponents and Logarithms.
  618. * FP_LLOGBNAN: (libc)Exponents and Logarithms.
  619. * fprintf: (libc)Formatted Output Functions.
  620. * __fpurge: (libc)Flushing Buffers.
  621. * fputc: (libc)Simple Output.
  622. * fputc_unlocked: (libc)Simple Output.
  623. * fputs: (libc)Simple Output.
  624. * fputs_unlocked: (libc)Simple Output.
  625. * fputwc: (libc)Simple Output.
  626. * fputwc_unlocked: (libc)Simple Output.
  627. * fputws: (libc)Simple Output.
  628. * fputws_unlocked: (libc)Simple Output.
  629. * __freadable: (libc)Opening Streams.
  630. * __freading: (libc)Opening Streams.
  631. * fread: (libc)Block Input/Output.
  632. * fread_unlocked: (libc)Block Input/Output.
  633. * free: (libc)Freeing after Malloc.
  634. * freopen64: (libc)Opening Streams.
  635. * freopen: (libc)Opening Streams.
  636. * frexpf: (libc)Normalization Functions.
  637. * frexp: (libc)Normalization Functions.
  638. * frexpl: (libc)Normalization Functions.
  639. * fromfpf: (libc)Rounding Functions.
  640. * fromfp: (libc)Rounding Functions.
  641. * fromfpl: (libc)Rounding Functions.
  642. * fromfpxf: (libc)Rounding Functions.
  643. * fromfpx: (libc)Rounding Functions.
  644. * fromfpxl: (libc)Rounding Functions.
  645. * fscanf: (libc)Formatted Input Functions.
  646. * fseek: (libc)File Positioning.
  647. * fseeko64: (libc)File Positioning.
  648. * fseeko: (libc)File Positioning.
  649. * F_SETFD: (libc)Descriptor Flags.
  650. * F_SETFL: (libc)Getting File Status Flags.
  651. * F_SETLK: (libc)File Locks.
  652. * F_SETLKW: (libc)File Locks.
  653. * __fsetlocking: (libc)Streams and Threads.
  654. * F_SETOWN: (libc)Interrupt Input.
  655. * fsetpos64: (libc)Portable Positioning.
  656. * fsetpos: (libc)Portable Positioning.
  657. * fstat64: (libc)Reading Attributes.
  658. * fstat: (libc)Reading Attributes.
  659. * fsync: (libc)Synchronizing I/O.
  660. * ftell: (libc)File Positioning.
  661. * ftello64: (libc)File Positioning.
  662. * ftello: (libc)File Positioning.
  663. * ftruncate64: (libc)File Size.
  664. * ftruncate: (libc)File Size.
  665. * ftrylockfile: (libc)Streams and Threads.
  666. * ftw64: (libc)Working with Directory Trees.
  667. * ftw: (libc)Working with Directory Trees.
  668. * funlockfile: (libc)Streams and Threads.
  669. * futimes: (libc)File Times.
  670. * fwide: (libc)Streams and I18N.
  671. * fwprintf: (libc)Formatted Output Functions.
  672. * __fwritable: (libc)Opening Streams.
  673. * fwrite: (libc)Block Input/Output.
  674. * fwrite_unlocked: (libc)Block Input/Output.
  675. * __fwriting: (libc)Opening Streams.
  676. * fwscanf: (libc)Formatted Input Functions.
  677. * gammaf: (libc)Special Functions.
  678. * gamma: (libc)Special Functions.
  679. * gammal: (libc)Special Functions.
  680. * __gconv_end_fct: (libc)glibc iconv Implementation.
  681. * __gconv_fct: (libc)glibc iconv Implementation.
  682. * __gconv_init_fct: (libc)glibc iconv Implementation.
  683. * gcvt: (libc)System V Number Conversion.
  684. * getauxval: (libc)Auxiliary Vector.
  685. * get_avphys_pages: (libc)Query Memory Parameters.
  686. * getchar: (libc)Character Input.
  687. * getchar_unlocked: (libc)Character Input.
  688. * getc: (libc)Character Input.
  689. * getcontext: (libc)System V contexts.
  690. * getc_unlocked: (libc)Character Input.
  691. * get_current_dir_name: (libc)Working Directory.
  692. * getcwd: (libc)Working Directory.
  693. * getdate: (libc)General Time String Parsing.
  694. * getdate_r: (libc)General Time String Parsing.
  695. * getdelim: (libc)Line Input.
  696. * getdomainnname: (libc)Host Identification.
  697. * getegid: (libc)Reading Persona.
  698. * getentropy: (libc)Unpredictable Bytes.
  699. * getenv: (libc)Environment Access.
  700. * geteuid: (libc)Reading Persona.
  701. * getfsent: (libc)fstab.
  702. * getfsfile: (libc)fstab.
  703. * getfsspec: (libc)fstab.
  704. * getgid: (libc)Reading Persona.
  705. * getgrent: (libc)Scanning All Groups.
  706. * getgrent_r: (libc)Scanning All Groups.
  707. * getgrgid: (libc)Lookup Group.
  708. * getgrgid_r: (libc)Lookup Group.
  709. * getgrnam: (libc)Lookup Group.
  710. * getgrnam_r: (libc)Lookup Group.
  711. * getgrouplist: (libc)Setting Groups.
  712. * getgroups: (libc)Reading Persona.
  713. * gethostbyaddr: (libc)Host Names.
  714. * gethostbyaddr_r: (libc)Host Names.
  715. * gethostbyname2: (libc)Host Names.
  716. * gethostbyname2_r: (libc)Host Names.
  717. * gethostbyname: (libc)Host Names.
  718. * gethostbyname_r: (libc)Host Names.
  719. * gethostent: (libc)Host Names.
  720. * gethostid: (libc)Host Identification.
  721. * gethostname: (libc)Host Identification.
  722. * getitimer: (libc)Setting an Alarm.
  723. * getline: (libc)Line Input.
  724. * getloadavg: (libc)Processor Resources.
  725. * getlogin: (libc)Who Logged In.
  726. * getmntent: (libc)mtab.
  727. * getmntent_r: (libc)mtab.
  728. * getnetbyaddr: (libc)Networks Database.
  729. * getnetbyname: (libc)Networks Database.
  730. * getnetent: (libc)Networks Database.
  731. * getnetgrent: (libc)Lookup Netgroup.
  732. * getnetgrent_r: (libc)Lookup Netgroup.
  733. * get_nprocs_conf: (libc)Processor Resources.
  734. * get_nprocs: (libc)Processor Resources.
  735. * getopt: (libc)Using Getopt.
  736. * getopt_long: (libc)Getopt Long Options.
  737. * getopt_long_only: (libc)Getopt Long Options.
  738. * getpagesize: (libc)Query Memory Parameters.
  739. * getpass: (libc)getpass.
  740. * getpayloadf: (libc)FP Bit Twiddling.
  741. * getpayload: (libc)FP Bit Twiddling.
  742. * getpayloadl: (libc)FP Bit Twiddling.
  743. * getpeername: (libc)Who is Connected.
  744. * getpgid: (libc)Process Group Functions.
  745. * getpgrp: (libc)Process Group Functions.
  746. * get_phys_pages: (libc)Query Memory Parameters.
  747. * getpid: (libc)Process Identification.
  748. * getppid: (libc)Process Identification.
  749. * getpriority: (libc)Traditional Scheduling Functions.
  750. * getprotobyname: (libc)Protocols Database.
  751. * getprotobynumber: (libc)Protocols Database.
  752. * getprotoent: (libc)Protocols Database.
  753. * getpt: (libc)Allocation.
  754. * getpwent: (libc)Scanning All Users.
  755. * getpwent_r: (libc)Scanning All Users.
  756. * getpwnam: (libc)Lookup User.
  757. * getpwnam_r: (libc)Lookup User.
  758. * getpwuid: (libc)Lookup User.
  759. * getpwuid_r: (libc)Lookup User.
  760. * getrandom: (libc)Unpredictable Bytes.
  761. * getrlimit64: (libc)Limits on Resources.
  762. * getrlimit: (libc)Limits on Resources.
  763. * getrusage: (libc)Resource Usage.
  764. * getservbyname: (libc)Services Database.
  765. * getservbyport: (libc)Services Database.
  766. * getservent: (libc)Services Database.
  767. * getsid: (libc)Process Group Functions.
  768. * gets: (libc)Line Input.
  769. * getsockname: (libc)Reading Address.
  770. * getsockopt: (libc)Socket Option Functions.
  771. * getsubopt: (libc)Suboptions.
  772. * gettext: (libc)Translation with gettext.
  773. * gettimeofday: (libc)High-Resolution Calendar.
  774. * getuid: (libc)Reading Persona.
  775. * getumask: (libc)Setting Permissions.
  776. * getutent: (libc)Manipulating the Database.
  777. * getutent_r: (libc)Manipulating the Database.
  778. * getutid: (libc)Manipulating the Database.
  779. * getutid_r: (libc)Manipulating the Database.
  780. * getutline: (libc)Manipulating the Database.
  781. * getutline_r: (libc)Manipulating the Database.
  782. * getutmp: (libc)XPG Functions.
  783. * getutmpx: (libc)XPG Functions.
  784. * getutxent: (libc)XPG Functions.
  785. * getutxid: (libc)XPG Functions.
  786. * getutxline: (libc)XPG Functions.
  787. * getwchar: (libc)Character Input.
  788. * getwchar_unlocked: (libc)Character Input.
  789. * getwc: (libc)Character Input.
  790. * getwc_unlocked: (libc)Character Input.
  791. * getwd: (libc)Working Directory.
  792. * getw: (libc)Character Input.
  793. * glob64: (libc)Calling Glob.
  794. * globfree64: (libc)More Flags for Globbing.
  795. * globfree: (libc)More Flags for Globbing.
  796. * glob: (libc)Calling Glob.
  797. * gmtime: (libc)Broken-down Time.
  798. * gmtime_r: (libc)Broken-down Time.
  799. * grantpt: (libc)Allocation.
  800. * gsignal: (libc)Signaling Yourself.
  801. * gtty: (libc)BSD Terminal Modes.
  802. * hasmntopt: (libc)mtab.
  803. * hcreate: (libc)Hash Search Function.
  804. * hcreate_r: (libc)Hash Search Function.
  805. * hdestroy: (libc)Hash Search Function.
  806. * hdestroy_r: (libc)Hash Search Function.
  807. * hsearch: (libc)Hash Search Function.
  808. * hsearch_r: (libc)Hash Search Function.
  809. * htonl: (libc)Byte Order.
  810. * htons: (libc)Byte Order.
  811. * HUGE_VALF: (libc)Math Error Reporting.
  812. * HUGE_VAL: (libc)Math Error Reporting.
  813. * HUGE_VALL: (libc)Math Error Reporting.
  814. * HUPCL: (libc)Control Modes.
  815. * hypotf: (libc)Exponents and Logarithms.
  816. * hypot: (libc)Exponents and Logarithms.
  817. * hypotl: (libc)Exponents and Logarithms.
  818. * ICANON: (libc)Local Modes.
  819. * iconv_close: (libc)Generic Conversion Interface.
  820. * iconv: (libc)Generic Conversion Interface.
  821. * iconv_open: (libc)Generic Conversion Interface.
  822. * ICRNL: (libc)Input Modes.
  823. * IEXTEN: (libc)Local Modes.
  824. * if_freenameindex: (libc)Interface Naming.
  825. * if_indextoname: (libc)Interface Naming.
  826. * if_nameindex: (libc)Interface Naming.
  827. * if_nametoindex: (libc)Interface Naming.
  828. * IFNAMSIZ: (libc)Interface Naming.
  829. * IFTODT: (libc)Directory Entries.
  830. * IGNBRK: (libc)Input Modes.
  831. * IGNCR: (libc)Input Modes.
  832. * IGNPAR: (libc)Input Modes.
  833. * I: (libc)Complex Numbers.
  834. * ilogbf: (libc)Exponents and Logarithms.
  835. * ilogb: (libc)Exponents and Logarithms.
  836. * ilogbl: (libc)Exponents and Logarithms.
  837. * _Imaginary_I: (libc)Complex Numbers.
  838. * imaxabs: (libc)Absolute Value.
  839. * IMAXBEL: (libc)Input Modes.
  840. * imaxdiv: (libc)Integer Division.
  841. * in6addr_any: (libc)Host Address Data Type.
  842. * in6addr_loopback: (libc)Host Address Data Type.
  843. * INADDR_ANY: (libc)Host Address Data Type.
  844. * INADDR_BROADCAST: (libc)Host Address Data Type.
  845. * INADDR_LOOPBACK: (libc)Host Address Data Type.
  846. * INADDR_NONE: (libc)Host Address Data Type.
  847. * index: (libc)Search Functions.
  848. * inet_addr: (libc)Host Address Functions.
  849. * inet_aton: (libc)Host Address Functions.
  850. * inet_lnaof: (libc)Host Address Functions.
  851. * inet_makeaddr: (libc)Host Address Functions.
  852. * inet_netof: (libc)Host Address Functions.
  853. * inet_network: (libc)Host Address Functions.
  854. * inet_ntoa: (libc)Host Address Functions.
  855. * inet_ntop: (libc)Host Address Functions.
  856. * inet_pton: (libc)Host Address Functions.
  857. * INFINITY: (libc)Infinity and NaN.
  858. * initgroups: (libc)Setting Groups.
  859. * initstate: (libc)BSD Random.
  860. * initstate_r: (libc)BSD Random.
  861. * INLCR: (libc)Input Modes.
  862. * innetgr: (libc)Netgroup Membership.
  863. * INPCK: (libc)Input Modes.
  864. * ioctl: (libc)IOCTLs.
  865. * _IOFBF: (libc)Controlling Buffering.
  866. * _IOLBF: (libc)Controlling Buffering.
  867. * _IONBF: (libc)Controlling Buffering.
  868. * IPPORT_RESERVED: (libc)Ports.
  869. * IPPORT_USERRESERVED: (libc)Ports.
  870. * isalnum: (libc)Classification of Characters.
  871. * isalpha: (libc)Classification of Characters.
  872. * isascii: (libc)Classification of Characters.
  873. * isatty: (libc)Is It a Terminal.
  874. * isblank: (libc)Classification of Characters.
  875. * iscanonical: (libc)Floating Point Classes.
  876. * iscntrl: (libc)Classification of Characters.
  877. * isdigit: (libc)Classification of Characters.
  878. * iseqsig: (libc)FP Comparison Functions.
  879. * isfinite: (libc)Floating Point Classes.
  880. * isgraph: (libc)Classification of Characters.
  881. * isgreaterequal: (libc)FP Comparison Functions.
  882. * isgreater: (libc)FP Comparison Functions.
  883. * ISIG: (libc)Local Modes.
  884. * isinff: (libc)Floating Point Classes.
  885. * isinf: (libc)Floating Point Classes.
  886. * isinfl: (libc)Floating Point Classes.
  887. * islessequal: (libc)FP Comparison Functions.
  888. * islessgreater: (libc)FP Comparison Functions.
  889. * isless: (libc)FP Comparison Functions.
  890. * islower: (libc)Classification of Characters.
  891. * isnanf: (libc)Floating Point Classes.
  892. * isnan: (libc)Floating Point Classes.
  893. * isnan: (libc)Floating Point Classes.
  894. * isnanl: (libc)Floating Point Classes.
  895. * isnormal: (libc)Floating Point Classes.
  896. * isprint: (libc)Classification of Characters.
  897. * ispunct: (libc)Classification of Characters.
  898. * issignaling: (libc)Floating Point Classes.
  899. * isspace: (libc)Classification of Characters.
  900. * issubnormal: (libc)Floating Point Classes.
  901. * ISTRIP: (libc)Input Modes.
  902. * isunordered: (libc)FP Comparison Functions.
  903. * isupper: (libc)Classification of Characters.
  904. * iswalnum: (libc)Classification of Wide Characters.
  905. * iswalpha: (libc)Classification of Wide Characters.
  906. * iswblank: (libc)Classification of Wide Characters.
  907. * iswcntrl: (libc)Classification of Wide Characters.
  908. * iswctype: (libc)Classification of Wide Characters.
  909. * iswdigit: (libc)Classification of Wide Characters.
  910. * iswgraph: (libc)Classification of Wide Characters.
  911. * iswlower: (libc)Classification of Wide Characters.
  912. * iswprint: (libc)Classification of Wide Characters.
  913. * iswpunct: (libc)Classification of Wide Characters.
  914. * iswspace: (libc)Classification of Wide Characters.
  915. * iswupper: (libc)Classification of Wide Characters.
  916. * iswxdigit: (libc)Classification of Wide Characters.
  917. * isxdigit: (libc)Classification of Characters.
  918. * iszero: (libc)Floating Point Classes.
  919. * IXANY: (libc)Input Modes.
  920. * IXOFF: (libc)Input Modes.
  921. * IXON: (libc)Input Modes.
  922. * j0f: (libc)Special Functions.
  923. * j0: (libc)Special Functions.
  924. * j0l: (libc)Special Functions.
  925. * j1f: (libc)Special Functions.
  926. * j1: (libc)Special Functions.
  927. * j1l: (libc)Special Functions.
  928. * jnf: (libc)Special Functions.
  929. * jn: (libc)Special Functions.
  930. * jnl: (libc)Special Functions.
  931. * jrand48: (libc)SVID Random.
  932. * jrand48_r: (libc)SVID Random.
  933. * kill: (libc)Signaling Another Process.
  934. * killpg: (libc)Signaling Another Process.
  935. * l64a: (libc)Encode Binary Data.
  936. * labs: (libc)Absolute Value.
  937. * lcong48: (libc)SVID Random.
  938. * lcong48_r: (libc)SVID Random.
  939. * L_ctermid: (libc)Identifying the Terminal.
  940. * L_cuserid: (libc)Who Logged In.
  941. * ldexpf: (libc)Normalization Functions.
  942. * ldexp: (libc)Normalization Functions.
  943. * ldexpl: (libc)Normalization Functions.
  944. * ldiv: (libc)Integer Division.
  945. * lfind: (libc)Array Search Function.
  946. * lgammaf: (libc)Special Functions.
  947. * lgammaf_r: (libc)Special Functions.
  948. * lgamma: (libc)Special Functions.
  949. * lgammal: (libc)Special Functions.
  950. * lgammal_r: (libc)Special Functions.
  951. * lgamma_r: (libc)Special Functions.
  952. * LINE_MAX: (libc)Utility Limits.
  953. * link: (libc)Hard Links.
  954. * LINK_MAX: (libc)Limits for Files.
  955. * lio_listio64: (libc)Asynchronous Reads/Writes.
  956. * lio_listio: (libc)Asynchronous Reads/Writes.
  957. * listen: (libc)Listening.
  958. * llabs: (libc)Absolute Value.
  959. * lldiv: (libc)Integer Division.
  960. * llogbf: (libc)Exponents and Logarithms.
  961. * llogb: (libc)Exponents and Logarithms.
  962. * llogbl: (libc)Exponents and Logarithms.
  963. * llrintf: (libc)Rounding Functions.
  964. * llrint: (libc)Rounding Functions.
  965. * llrintl: (libc)Rounding Functions.
  966. * llroundf: (libc)Rounding Functions.
  967. * llround: (libc)Rounding Functions.
  968. * llroundl: (libc)Rounding Functions.
  969. * localeconv: (libc)The Lame Way to Locale Data.
  970. * localtime: (libc)Broken-down Time.
  971. * localtime_r: (libc)Broken-down Time.
  972. * log10f: (libc)Exponents and Logarithms.
  973. * log10: (libc)Exponents and Logarithms.
  974. * log10l: (libc)Exponents and Logarithms.
  975. * log1pf: (libc)Exponents and Logarithms.
  976. * log1p: (libc)Exponents and Logarithms.
  977. * log1pl: (libc)Exponents and Logarithms.
  978. * log2f: (libc)Exponents and Logarithms.
  979. * log2: (libc)Exponents and Logarithms.
  980. * log2l: (libc)Exponents and Logarithms.
  981. * logbf: (libc)Exponents and Logarithms.
  982. * logb: (libc)Exponents and Logarithms.
  983. * logbl: (libc)Exponents and Logarithms.
  984. * logf: (libc)Exponents and Logarithms.
  985. * login: (libc)Logging In and Out.
  986. * login_tty: (libc)Logging In and Out.
  987. * log: (libc)Exponents and Logarithms.
  988. * logl: (libc)Exponents and Logarithms.
  989. * logout: (libc)Logging In and Out.
  990. * logwtmp: (libc)Logging In and Out.
  991. * longjmp: (libc)Non-Local Details.
  992. * lrand48: (libc)SVID Random.
  993. * lrand48_r: (libc)SVID Random.
  994. * lrintf: (libc)Rounding Functions.
  995. * lrint: (libc)Rounding Functions.
  996. * lrintl: (libc)Rounding Functions.
  997. * lroundf: (libc)Rounding Functions.
  998. * lround: (libc)Rounding Functions.
  999. * lroundl: (libc)Rounding Functions.
  1000. * lsearch: (libc)Array Search Function.
  1001. * lseek64: (libc)File Position Primitive.
  1002. * lseek: (libc)File Position Primitive.
  1003. * lstat64: (libc)Reading Attributes.
  1004. * lstat: (libc)Reading Attributes.
  1005. * L_tmpnam: (libc)Temporary Files.
  1006. * lutimes: (libc)File Times.
  1007. * madvise: (libc)Memory-mapped I/O.
  1008. * makecontext: (libc)System V contexts.
  1009. * mallinfo: (libc)Statistics of Malloc.
  1010. * malloc: (libc)Basic Allocation.
  1011. * mallopt: (libc)Malloc Tunable Parameters.
  1012. * MAX_CANON: (libc)Limits for Files.
  1013. * MAX_INPUT: (libc)Limits for Files.
  1014. * MAXNAMLEN: (libc)Limits for Files.
  1015. * MAXSYMLINKS: (libc)Symbolic Links.
  1016. * MB_CUR_MAX: (libc)Selecting the Conversion.
  1017. * mblen: (libc)Non-reentrant Character Conversion.
  1018. * MB_LEN_MAX: (libc)Selecting the Conversion.
  1019. * mbrlen: (libc)Converting a Character.
  1020. * mbrtowc: (libc)Converting a Character.
  1021. * mbsinit: (libc)Keeping the state.
  1022. * mbsnrtowcs: (libc)Converting Strings.
  1023. * mbsrtowcs: (libc)Converting Strings.
  1024. * mbstowcs: (libc)Non-reentrant String Conversion.
  1025. * mbtowc: (libc)Non-reentrant Character Conversion.
  1026. * mcheck: (libc)Heap Consistency Checking.
  1027. * MDMBUF: (libc)Control Modes.
  1028. * memalign: (libc)Aligned Memory Blocks.
  1029. * memccpy: (libc)Copying Strings and Arrays.
  1030. * memchr: (libc)Search Functions.
  1031. * memcmp: (libc)String/Array Comparison.
  1032. * memcpy: (libc)Copying Strings and Arrays.
  1033. * memfrob: (libc)Trivial Encryption.
  1034. * memmem: (libc)Search Functions.
  1035. * memmove: (libc)Copying Strings and Arrays.
  1036. * mempcpy: (libc)Copying Strings and Arrays.
  1037. * memrchr: (libc)Search Functions.
  1038. * memset: (libc)Copying Strings and Arrays.
  1039. * mkdir: (libc)Creating Directories.
  1040. * mkdtemp: (libc)Temporary Files.
  1041. * mkfifo: (libc)FIFO Special Files.
  1042. * mknod: (libc)Making Special Files.
  1043. * mkstemp: (libc)Temporary Files.
  1044. * mktemp: (libc)Temporary Files.
  1045. * mktime: (libc)Broken-down Time.
  1046. * mlockall: (libc)Page Lock Functions.
  1047. * mlock: (libc)Page Lock Functions.
  1048. * mmap64: (libc)Memory-mapped I/O.
  1049. * mmap: (libc)Memory-mapped I/O.
  1050. * modff: (libc)Rounding Functions.
  1051. * modf: (libc)Rounding Functions.
  1052. * modfl: (libc)Rounding Functions.
  1053. * mount: (libc)Mount-Unmount-Remount.
  1054. * mprobe: (libc)Heap Consistency Checking.
  1055. * mrand48: (libc)SVID Random.
  1056. * mrand48_r: (libc)SVID Random.
  1057. * mremap: (libc)Memory-mapped I/O.
  1058. * MSG_DONTROUTE: (libc)Socket Data Options.
  1059. * MSG_OOB: (libc)Socket Data Options.
  1060. * MSG_PEEK: (libc)Socket Data Options.
  1061. * msync: (libc)Memory-mapped I/O.
  1062. * mtrace: (libc)Tracing malloc.
  1063. * munlockall: (libc)Page Lock Functions.
  1064. * munlock: (libc)Page Lock Functions.
  1065. * munmap: (libc)Memory-mapped I/O.
  1066. * muntrace: (libc)Tracing malloc.
  1067. * NAME_MAX: (libc)Limits for Files.
  1068. * nanf: (libc)FP Bit Twiddling.
  1069. * nan: (libc)FP Bit Twiddling.
  1070. * NAN: (libc)Infinity and NaN.
  1071. * nanl: (libc)FP Bit Twiddling.
  1072. * nanosleep: (libc)Sleeping.
  1073. * NCCS: (libc)Mode Data Types.
  1074. * nearbyintf: (libc)Rounding Functions.
  1075. * nearbyint: (libc)Rounding Functions.
  1076. * nearbyintl: (libc)Rounding Functions.
  1077. * nextafterf: (libc)FP Bit Twiddling.
  1078. * nextafter: (libc)FP Bit Twiddling.
  1079. * nextafterl: (libc)FP Bit Twiddling.
  1080. * nextdownf: (libc)FP Bit Twiddling.
  1081. * nextdown: (libc)FP Bit Twiddling.
  1082. * nextdownl: (libc)FP Bit Twiddling.
  1083. * nexttowardf: (libc)FP Bit Twiddling.
  1084. * nexttoward: (libc)FP Bit Twiddling.
  1085. * nexttowardl: (libc)FP Bit Twiddling.
  1086. * nextupf: (libc)FP Bit Twiddling.
  1087. * nextup: (libc)FP Bit Twiddling.
  1088. * nextupl: (libc)FP Bit Twiddling.
  1089. * nftw64: (libc)Working with Directory Trees.
  1090. * nftw: (libc)Working with Directory Trees.
  1091. * ngettext: (libc)Advanced gettext functions.
  1092. * NGROUPS_MAX: (libc)General Limits.
  1093. * nice: (libc)Traditional Scheduling Functions.
  1094. * nl_langinfo: (libc)The Elegant and Fast Way.
  1095. * NOFLSH: (libc)Local Modes.
  1096. * NOKERNINFO: (libc)Local Modes.
  1097. * nrand48: (libc)SVID Random.
  1098. * nrand48_r: (libc)SVID Random.
  1099. * NSIG: (libc)Standard Signals.
  1100. * ntohl: (libc)Byte Order.
  1101. * ntohs: (libc)Byte Order.
  1102. * ntp_adjtime: (libc)High Accuracy Clock.
  1103. * ntp_gettime: (libc)High Accuracy Clock.
  1104. * NULL: (libc)Null Pointer Constant.
  1105. * O_ACCMODE: (libc)Access Modes.
  1106. * O_APPEND: (libc)Operating Modes.
  1107. * O_ASYNC: (libc)Operating Modes.
  1108. * obstack_1grow_fast: (libc)Extra Fast Growing.
  1109. * obstack_1grow: (libc)Growing Objects.
  1110. * obstack_alignment_mask: (libc)Obstacks Data Alignment.
  1111. * obstack_alloc: (libc)Allocation in an Obstack.
  1112. * obstack_base: (libc)Status of an Obstack.
  1113. * obstack_blank_fast: (libc)Extra Fast Growing.
  1114. * obstack_blank: (libc)Growing Objects.
  1115. * obstack_chunk_size: (libc)Obstack Chunks.
  1116. * obstack_copy0: (libc)Allocation in an Obstack.
  1117. * obstack_copy: (libc)Allocation in an Obstack.
  1118. * obstack_finish: (libc)Growing Objects.
  1119. * obstack_free: (libc)Freeing Obstack Objects.
  1120. * obstack_grow0: (libc)Growing Objects.
  1121. * obstack_grow: (libc)Growing Objects.
  1122. * obstack_init: (libc)Preparing for Obstacks.
  1123. * obstack_int_grow_fast: (libc)Extra Fast Growing.
  1124. * obstack_int_grow: (libc)Growing Objects.
  1125. * obstack_next_free: (libc)Status of an Obstack.
  1126. * obstack_object_size: (libc)Growing Objects.
  1127. * obstack_object_size: (libc)Status of an Obstack.
  1128. * obstack_printf: (libc)Dynamic Output.
  1129. * obstack_ptr_grow_fast: (libc)Extra Fast Growing.
  1130. * obstack_ptr_grow: (libc)Growing Objects.
  1131. * obstack_room: (libc)Extra Fast Growing.
  1132. * obstack_vprintf: (libc)Variable Arguments Output.
  1133. * O_CREAT: (libc)Open-time Flags.
  1134. * O_EXCL: (libc)Open-time Flags.
  1135. * O_EXEC: (libc)Access Modes.
  1136. * O_EXLOCK: (libc)Open-time Flags.
  1137. * offsetof: (libc)Structure Measurement.
  1138. * O_FSYNC: (libc)Operating Modes.
  1139. * O_IGNORE_CTTY: (libc)Open-time Flags.
  1140. * O_NDELAY: (libc)Operating Modes.
  1141. * on_exit: (libc)Cleanups on Exit.
  1142. * ONLCR: (libc)Output Modes.
  1143. * O_NOATIME: (libc)Operating Modes.
  1144. * O_NOCTTY: (libc)Open-time Flags.
  1145. * ONOEOT: (libc)Output Modes.
  1146. * O_NOLINK: (libc)Open-time Flags.
  1147. * O_NONBLOCK: (libc)Open-time Flags.
  1148. * O_NONBLOCK: (libc)Operating Modes.
  1149. * O_NOTRANS: (libc)Open-time Flags.
  1150. * open64: (libc)Opening and Closing Files.
  1151. * opendir: (libc)Opening a Directory.
  1152. * open: (libc)Opening and Closing Files.
  1153. * openlog: (libc)openlog.
  1154. * OPEN_MAX: (libc)General Limits.
  1155. * open_memstream: (libc)String Streams.
  1156. * openpty: (libc)Pseudo-Terminal Pairs.
  1157. * OPOST: (libc)Output Modes.
  1158. * O_RDONLY: (libc)Access Modes.
  1159. * O_RDWR: (libc)Access Modes.
  1160. * O_READ: (libc)Access Modes.
  1161. * O_SHLOCK: (libc)Open-time Flags.
  1162. * O_SYNC: (libc)Operating Modes.
  1163. * O_TRUNC: (libc)Open-time Flags.
  1164. * O_WRITE: (libc)Access Modes.
  1165. * O_WRONLY: (libc)Access Modes.
  1166. * OXTABS: (libc)Output Modes.
  1167. * PA_FLAG_MASK: (libc)Parsing a Template String.
  1168. * PARENB: (libc)Control Modes.
  1169. * PARMRK: (libc)Input Modes.
  1170. * PARODD: (libc)Control Modes.
  1171. * parse_printf_format: (libc)Parsing a Template String.
  1172. * pathconf: (libc)Pathconf.
  1173. * PATH_MAX: (libc)Limits for Files.
  1174. * _PATH_UTMP: (libc)Manipulating the Database.
  1175. * _PATH_WTMP: (libc)Manipulating the Database.
  1176. * pause: (libc)Using Pause.
  1177. * pclose: (libc)Pipe to a Subprocess.
  1178. * PENDIN: (libc)Local Modes.
  1179. * perror: (libc)Error Messages.
  1180. * PF_FILE: (libc)Local Namespace Details.
  1181. * PF_INET6: (libc)Internet Namespace.
  1182. * PF_INET: (libc)Internet Namespace.
  1183. * PF_LOCAL: (libc)Local Namespace Details.
  1184. * PF_UNIX: (libc)Local Namespace Details.
  1185. * PIPE_BUF: (libc)Limits for Files.
  1186. * pipe: (libc)Creating a Pipe.
  1187. * popen: (libc)Pipe to a Subprocess.
  1188. * _POSIX2_C_DEV: (libc)System Options.
  1189. * _POSIX2_C_VERSION: (libc)Version Supported.
  1190. * _POSIX2_FORT_DEV: (libc)System Options.
  1191. * _POSIX2_FORT_RUN: (libc)System Options.
  1192. * _POSIX2_LOCALEDEF: (libc)System Options.
  1193. * _POSIX2_SW_DEV: (libc)System Options.
  1194. * _POSIX_CHOWN_RESTRICTED: (libc)Options for Files.
  1195. * posix_fallocate64: (libc)Storage Allocation.
  1196. * posix_fallocate: (libc)Storage Allocation.
  1197. * _POSIX_JOB_CONTROL: (libc)System Options.
  1198. * posix_memalign: (libc)Aligned Memory Blocks.
  1199. * _POSIX_NO_TRUNC: (libc)Options for Files.
  1200. * _POSIX_SAVED_IDS: (libc)System Options.
  1201. * _POSIX_VDISABLE: (libc)Options for Files.
  1202. * _POSIX_VERSION: (libc)Version Supported.
  1203. * pow10f: (libc)Exponents and Logarithms.
  1204. * pow10: (libc)Exponents and Logarithms.
  1205. * pow10l: (libc)Exponents and Logarithms.
  1206. * powf: (libc)Exponents and Logarithms.
  1207. * pow: (libc)Exponents and Logarithms.
  1208. * powl: (libc)Exponents and Logarithms.
  1209. * __ppc_get_timebase_freq: (libc)PowerPC.
  1210. * __ppc_get_timebase: (libc)PowerPC.
  1211. * __ppc_mdoio: (libc)PowerPC.
  1212. * __ppc_mdoom: (libc)PowerPC.
  1213. * __ppc_set_ppr_low: (libc)PowerPC.
  1214. * __ppc_set_ppr_med_high: (libc)PowerPC.
  1215. * __ppc_set_ppr_med: (libc)PowerPC.
  1216. * __ppc_set_ppr_med_low: (libc)PowerPC.
  1217. * __ppc_set_ppr_very_low: (libc)PowerPC.
  1218. * __ppc_yield: (libc)PowerPC.
  1219. * pread64: (libc)I/O Primitives.
  1220. * pread: (libc)I/O Primitives.
  1221. * printf: (libc)Formatted Output Functions.
  1222. * printf_size_info: (libc)Predefined Printf Handlers.
  1223. * printf_size: (libc)Predefined Printf Handlers.
  1224. * psignal: (libc)Signal Messages.
  1225. * pthread_getattr_default_np: (libc)Default Thread Attributes.
  1226. * pthread_getspecific: (libc)Thread-specific Data.
  1227. * pthread_key_create: (libc)Thread-specific Data.
  1228. * pthread_key_delete: (libc)Thread-specific Data.
  1229. * pthread_setattr_default_np: (libc)Default Thread Attributes.
  1230. * pthread_setspecific: (libc)Thread-specific Data.
  1231. * P_tmpdir: (libc)Temporary Files.
  1232. * ptsname: (libc)Allocation.
  1233. * ptsname_r: (libc)Allocation.
  1234. * putchar: (libc)Simple Output.
  1235. * putchar_unlocked: (libc)Simple Output.
  1236. * putc: (libc)Simple Output.
  1237. * putc_unlocked: (libc)Simple Output.
  1238. * putenv: (libc)Environment Access.
  1239. * putpwent: (libc)Writing a User Entry.
  1240. * puts: (libc)Simple Output.
  1241. * pututline: (libc)Manipulating the Database.
  1242. * pututxline: (libc)XPG Functions.
  1243. * putwchar: (libc)Simple Output.
  1244. * putwchar_unlocked: (libc)Simple Output.
  1245. * putwc: (libc)Simple Output.
  1246. * putwc_unlocked: (libc)Simple Output.
  1247. * putw: (libc)Simple Output.
  1248. * pwrite64: (libc)I/O Primitives.
  1249. * pwrite: (libc)I/O Primitives.
  1250. * qecvt: (libc)System V Number Conversion.
  1251. * qecvt_r: (libc)System V Number Conversion.
  1252. * qfcvt: (libc)System V Number Conversion.
  1253. * qfcvt_r: (libc)System V Number Conversion.
  1254. * qgcvt: (libc)System V Number Conversion.
  1255. * qsort: (libc)Array Sort Function.
  1256. * raise: (libc)Signaling Yourself.
  1257. * rand: (libc)ISO Random.
  1258. * RAND_MAX: (libc)ISO Random.
  1259. * random: (libc)BSD Random.
  1260. * random_r: (libc)BSD Random.
  1261. * rand_r: (libc)ISO Random.
  1262. * rawmemchr: (libc)Search Functions.
  1263. * readdir64: (libc)Reading/Closing Directory.
  1264. * readdir64_r: (libc)Reading/Closing Directory.
  1265. * readdir: (libc)Reading/Closing Directory.
  1266. * readdir_r: (libc)Reading/Closing Directory.
  1267. * read: (libc)I/O Primitives.
  1268. * readlink: (libc)Symbolic Links.
  1269. * readv: (libc)Scatter-Gather.
  1270. * realloc: (libc)Changing Block Size.
  1271. * realpath: (libc)Symbolic Links.
  1272. * recvfrom: (libc)Receiving Datagrams.
  1273. * recv: (libc)Receiving Data.
  1274. * recvmsg: (libc)Receiving Datagrams.
  1275. * RE_DUP_MAX: (libc)General Limits.
  1276. * regcomp: (libc)POSIX Regexp Compilation.
  1277. * regerror: (libc)Regexp Cleanup.
  1278. * regexec: (libc)Matching POSIX Regexps.
  1279. * regfree: (libc)Regexp Cleanup.
  1280. * register_printf_function: (libc)Registering New Conversions.
  1281. * remainderf: (libc)Remainder Functions.
  1282. * remainder: (libc)Remainder Functions.
  1283. * remainderl: (libc)Remainder Functions.
  1284. * remove: (libc)Deleting Files.
  1285. * rename: (libc)Renaming Files.
  1286. * rewinddir: (libc)Random Access Directory.
  1287. * rewind: (libc)File Positioning.
  1288. * rindex: (libc)Search Functions.
  1289. * rintf: (libc)Rounding Functions.
  1290. * rint: (libc)Rounding Functions.
  1291. * rintl: (libc)Rounding Functions.
  1292. * RLIM_INFINITY: (libc)Limits on Resources.
  1293. * rmdir: (libc)Deleting Files.
  1294. * R_OK: (libc)Testing File Access.
  1295. * roundevenf: (libc)Rounding Functions.
  1296. * roundeven: (libc)Rounding Functions.
  1297. * roundevenl: (libc)Rounding Functions.
  1298. * roundf: (libc)Rounding Functions.
  1299. * round: (libc)Rounding Functions.
  1300. * roundl: (libc)Rounding Functions.
  1301. * rpmatch: (libc)Yes-or-No Questions.
  1302. * SA_NOCLDSTOP: (libc)Flags for Sigaction.
  1303. * SA_ONSTACK: (libc)Flags for Sigaction.
  1304. * SA_RESTART: (libc)Flags for Sigaction.
  1305. * sbrk: (libc)Resizing the Data Segment.
  1306. * scalbf: (libc)Normalization Functions.
  1307. * scalb: (libc)Normalization Functions.
  1308. * scalbl: (libc)Normalization Functions.
  1309. * scalblnf: (libc)Normalization Functions.
  1310. * scalbln: (libc)Normalization Functions.
  1311. * scalblnl: (libc)Normalization Functions.
  1312. * scalbnf: (libc)Normalization Functions.
  1313. * scalbn: (libc)Normalization Functions.
  1314. * scalbnl: (libc)Normalization Functions.
  1315. * scandir64: (libc)Scanning Directory Content.
  1316. * scandir: (libc)Scanning Directory Content.
  1317. * scanf: (libc)Formatted Input Functions.
  1318. * sched_getaffinity: (libc)CPU Affinity.
  1319. * sched_getparam: (libc)Basic Scheduling Functions.
  1320. * sched_get_priority_max: (libc)Basic Scheduling Functions.
  1321. * sched_get_priority_min: (libc)Basic Scheduling Functions.
  1322. * sched_getscheduler: (libc)Basic Scheduling Functions.
  1323. * sched_rr_get_interval: (libc)Basic Scheduling Functions.
  1324. * sched_setaffinity: (libc)CPU Affinity.
  1325. * sched_setparam: (libc)Basic Scheduling Functions.
  1326. * sched_setscheduler: (libc)Basic Scheduling Functions.
  1327. * sched_yield: (libc)Basic Scheduling Functions.
  1328. * secure_getenv: (libc)Environment Access.
  1329. * seed48: (libc)SVID Random.
  1330. * seed48_r: (libc)SVID Random.
  1331. * SEEK_CUR: (libc)File Positioning.
  1332. * seekdir: (libc)Random Access Directory.
  1333. * SEEK_END: (libc)File Positioning.
  1334. * SEEK_SET: (libc)File Positioning.
  1335. * select: (libc)Waiting for I/O.
  1336. * sem_close: (libc)Semaphores.
  1337. * semctl: (libc)Semaphores.
  1338. * sem_destroy: (libc)Semaphores.
  1339. * semget: (libc)Semaphores.
  1340. * sem_getvalue: (libc)Semaphores.
  1341. * sem_init: (libc)Semaphores.
  1342. * sem_open: (libc)Semaphores.
  1343. * semop: (libc)Semaphores.
  1344. * sem_post: (libc)Semaphores.
  1345. * semtimedop: (libc)Semaphores.
  1346. * sem_timedwait: (libc)Semaphores.
  1347. * sem_trywait: (libc)Semaphores.
  1348. * sem_unlink: (libc)Semaphores.
  1349. * sem_wait: (libc)Semaphores.
  1350. * send: (libc)Sending Data.
  1351. * sendmsg: (libc)Receiving Datagrams.
  1352. * sendto: (libc)Sending Datagrams.
  1353. * setbuffer: (libc)Controlling Buffering.
  1354. * setbuf: (libc)Controlling Buffering.
  1355. * setcontext: (libc)System V contexts.
  1356. * setdomainname: (libc)Host Identification.
  1357. * setegid: (libc)Setting Groups.
  1358. * setenv: (libc)Environment Access.
  1359. * seteuid: (libc)Setting User ID.
  1360. * setfsent: (libc)fstab.
  1361. * setgid: (libc)Setting Groups.
  1362. * setgrent: (libc)Scanning All Groups.
  1363. * setgroups: (libc)Setting Groups.
  1364. * sethostent: (libc)Host Names.
  1365. * sethostid: (libc)Host Identification.
  1366. * sethostname: (libc)Host Identification.
  1367. * setitimer: (libc)Setting an Alarm.
  1368. * setjmp: (libc)Non-Local Details.
  1369. * setkey: (libc)DES Encryption.
  1370. * setkey_r: (libc)DES Encryption.
  1371. * setlinebuf: (libc)Controlling Buffering.
  1372. * setlocale: (libc)Setting the Locale.
  1373. * setlogmask: (libc)setlogmask.
  1374. * setmntent: (libc)mtab.
  1375. * setnetent: (libc)Networks Database.
  1376. * setnetgrent: (libc)Lookup Netgroup.
  1377. * setpayloadf: (libc)FP Bit Twiddling.
  1378. * setpayload: (libc)FP Bit Twiddling.
  1379. * setpayloadl: (libc)FP Bit Twiddling.
  1380. * setpayloadsigf: (libc)FP Bit Twiddling.
  1381. * setpayloadsig: (libc)FP Bit Twiddling.
  1382. * setpayloadsigl: (libc)FP Bit Twiddling.
  1383. * setpgid: (libc)Process Group Functions.
  1384. * setpgrp: (libc)Process Group Functions.
  1385. * setpriority: (libc)Traditional Scheduling Functions.
  1386. * setprotoent: (libc)Protocols Database.
  1387. * setpwent: (libc)Scanning All Users.
  1388. * setregid: (libc)Setting Groups.
  1389. * setreuid: (libc)Setting User ID.
  1390. * setrlimit64: (libc)Limits on Resources.
  1391. * setrlimit: (libc)Limits on Resources.
  1392. * setservent: (libc)Services Database.
  1393. * setsid: (libc)Process Group Functions.
  1394. * setsockopt: (libc)Socket Option Functions.
  1395. * setstate: (libc)BSD Random.
  1396. * setstate_r: (libc)BSD Random.
  1397. * settimeofday: (libc)High-Resolution Calendar.
  1398. * setuid: (libc)Setting User ID.
  1399. * setutent: (libc)Manipulating the Database.
  1400. * setutxent: (libc)XPG Functions.
  1401. * setvbuf: (libc)Controlling Buffering.
  1402. * shm_open: (libc)Memory-mapped I/O.
  1403. * shm_unlink: (libc)Memory-mapped I/O.
  1404. * shutdown: (libc)Closing a Socket.
  1405. * S_IFMT: (libc)Testing File Type.
  1406. * SIGABRT: (libc)Program Error Signals.
  1407. * sigaction: (libc)Advanced Signal Handling.
  1408. * sigaddset: (libc)Signal Sets.
  1409. * SIGALRM: (libc)Alarm Signals.
  1410. * sigaltstack: (libc)Signal Stack.
  1411. * sigblock: (libc)BSD Signal Handling.
  1412. * SIGBUS: (libc)Program Error Signals.
  1413. * SIGCHLD: (libc)Job Control Signals.
  1414. * SIGCLD: (libc)Job Control Signals.
  1415. * SIGCONT: (libc)Job Control Signals.
  1416. * sigdelset: (libc)Signal Sets.
  1417. * sigemptyset: (libc)Signal Sets.
  1418. * SIGEMT: (libc)Program Error Signals.
  1419. * SIG_ERR: (libc)Basic Signal Handling.
  1420. * sigfillset: (libc)Signal Sets.
  1421. * SIGFPE: (libc)Program Error Signals.
  1422. * SIGHUP: (libc)Termination Signals.
  1423. * SIGILL: (libc)Program Error Signals.
  1424. * SIGINFO: (libc)Miscellaneous Signals.
  1425. * siginterrupt: (libc)BSD Signal Handling.
  1426. * SIGINT: (libc)Termination Signals.
  1427. * SIGIO: (libc)Asynchronous I/O Signals.
  1428. * SIGIOT: (libc)Program Error Signals.
  1429. * sigismember: (libc)Signal Sets.
  1430. * SIGKILL: (libc)Termination Signals.
  1431. * siglongjmp: (libc)Non-Local Exits and Signals.
  1432. * SIGLOST: (libc)Operation Error Signals.
  1433. * sigmask: (libc)BSD Signal Handling.
  1434. * signal: (libc)Basic Signal Handling.
  1435. * signbit: (libc)FP Bit Twiddling.
  1436. * significandf: (libc)Normalization Functions.
  1437. * significand: (libc)Normalization Functions.
  1438. * significandl: (libc)Normalization Functions.
  1439. * sigpause: (libc)BSD Signal Handling.
  1440. * sigpending: (libc)Checking for Pending Signals.
  1441. * SIGPIPE: (libc)Operation Error Signals.
  1442. * SIGPOLL: (libc)Asynchronous I/O Signals.
  1443. * sigprocmask: (libc)Process Signal Mask.
  1444. * SIGPROF: (libc)Alarm Signals.
  1445. * SIGQUIT: (libc)Termination Signals.
  1446. * SIGSEGV: (libc)Program Error Signals.
  1447. * sigsetjmp: (libc)Non-Local Exits and Signals.
  1448. * sigsetmask: (libc)BSD Signal Handling.
  1449. * sigstack: (libc)Signal Stack.
  1450. * SIGSTOP: (libc)Job Control Signals.
  1451. * sigsuspend: (libc)Sigsuspend.
  1452. * SIGSYS: (libc)Program Error Signals.
  1453. * SIGTERM: (libc)Termination Signals.
  1454. * SIGTRAP: (libc)Program Error Signals.
  1455. * SIGTSTP: (libc)Job Control Signals.
  1456. * SIGTTIN: (libc)Job Control Signals.
  1457. * SIGTTOU: (libc)Job Control Signals.
  1458. * SIGURG: (libc)Asynchronous I/O Signals.
  1459. * SIGUSR1: (libc)Miscellaneous Signals.
  1460. * SIGUSR2: (libc)Miscellaneous Signals.
  1461. * SIGVTALRM: (libc)Alarm Signals.
  1462. * SIGWINCH: (libc)Miscellaneous Signals.
  1463. * SIGXCPU: (libc)Operation Error Signals.
  1464. * SIGXFSZ: (libc)Operation Error Signals.
  1465. * sincosf: (libc)Trig Functions.
  1466. * sincos: (libc)Trig Functions.
  1467. * sincosl: (libc)Trig Functions.
  1468. * sinf: (libc)Trig Functions.
  1469. * sinhf: (libc)Hyperbolic Functions.
  1470. * sinh: (libc)Hyperbolic Functions.
  1471. * sinhl: (libc)Hyperbolic Functions.
  1472. * sin: (libc)Trig Functions.
  1473. * sinl: (libc)Trig Functions.
  1474. * S_ISBLK: (libc)Testing File Type.
  1475. * S_ISCHR: (libc)Testing File Type.
  1476. * S_ISDIR: (libc)Testing File Type.
  1477. * S_ISFIFO: (libc)Testing File Type.
  1478. * S_ISLNK: (libc)Testing File Type.
  1479. * S_ISREG: (libc)Testing File Type.
  1480. * S_ISSOCK: (libc)Testing File Type.
  1481. * sleep: (libc)Sleeping.
  1482. * SNANF: (libc)Infinity and NaN.
  1483. * SNAN: (libc)Infinity and NaN.
  1484. * SNANL: (libc)Infinity and NaN.
  1485. * snprintf: (libc)Formatted Output Functions.
  1486. * SOCK_DGRAM: (libc)Communication Styles.
  1487. * socket: (libc)Creating a Socket.
  1488. * socketpair: (libc)Socket Pairs.
  1489. * SOCK_RAW: (libc)Communication Styles.
  1490. * SOCK_RDM: (libc)Communication Styles.
  1491. * SOCK_SEQPACKET: (libc)Communication Styles.
  1492. * SOCK_STREAM: (libc)Communication Styles.
  1493. * SOL_SOCKET: (libc)Socket-Level Options.
  1494. * sprintf: (libc)Formatted Output Functions.
  1495. * sqrtf: (libc)Exponents and Logarithms.
  1496. * sqrt: (libc)Exponents and Logarithms.
  1497. * sqrtl: (libc)Exponents and Logarithms.
  1498. * srand48: (libc)SVID Random.
  1499. * srand48_r: (libc)SVID Random.
  1500. * srand: (libc)ISO Random.
  1501. * srandom: (libc)BSD Random.
  1502. * srandom_r: (libc)BSD Random.
  1503. * sscanf: (libc)Formatted Input Functions.
  1504. * ssignal: (libc)Basic Signal Handling.
  1505. * SSIZE_MAX: (libc)General Limits.
  1506. * stat64: (libc)Reading Attributes.
  1507. * stat: (libc)Reading Attributes.
  1508. * stime: (libc)Simple Calendar Time.
  1509. * stpcpy: (libc)Copying Strings and Arrays.
  1510. * stpncpy: (libc)Truncating Strings.
  1511. * strcasecmp: (libc)String/Array Comparison.
  1512. * strcasestr: (libc)Search Functions.
  1513. * strcat: (libc)Concatenating Strings.
  1514. * strchr: (libc)Search Functions.
  1515. * strchrnul: (libc)Search Functions.
  1516. * strcmp: (libc)String/Array Comparison.
  1517. * strcoll: (libc)Collation Functions.
  1518. * strcpy: (libc)Copying Strings and Arrays.
  1519. * strcspn: (libc)Search Functions.
  1520. * strdupa: (libc)Copying Strings and Arrays.
  1521. * strdup: (libc)Copying Strings and Arrays.
  1522. * STREAM_MAX: (libc)General Limits.
  1523. * strerror: (libc)Error Messages.
  1524. * strerror_r: (libc)Error Messages.
  1525. * strfmon: (libc)Formatting Numbers.
  1526. * strfromd: (libc)Printing of Floats.
  1527. * strfromf: (libc)Printing of Floats.
  1528. * strfroml: (libc)Printing of Floats.
  1529. * strfry: (libc)strfry.
  1530. * strftime: (libc)Formatting Calendar Time.
  1531. * strlen: (libc)String Length.
  1532. * strncasecmp: (libc)String/Array Comparison.
  1533. * strncat: (libc)Truncating Strings.
  1534. * strncmp: (libc)String/Array Comparison.
  1535. * strncpy: (libc)Truncating Strings.
  1536. * strndupa: (libc)Truncating Strings.
  1537. * strndup: (libc)Truncating Strings.
  1538. * strnlen: (libc)String Length.
  1539. * strpbrk: (libc)Search Functions.
  1540. * strptime: (libc)Low-Level Time String Parsing.
  1541. * strrchr: (libc)Search Functions.
  1542. * strsep: (libc)Finding Tokens in a String.
  1543. * strsignal: (libc)Signal Messages.
  1544. * strspn: (libc)Search Functions.
  1545. * strstr: (libc)Search Functions.
  1546. * strtod: (libc)Parsing of Floats.
  1547. * strtof: (libc)Parsing of Floats.
  1548. * strtoimax: (libc)Parsing of Integers.
  1549. * strtok: (libc)Finding Tokens in a String.
  1550. * strtok_r: (libc)Finding Tokens in a String.
  1551. * strtold: (libc)Parsing of Floats.
  1552. * strtol: (libc)Parsing of Integers.
  1553. * strtoll: (libc)Parsing of Integers.
  1554. * strtoq: (libc)Parsing of Integers.
  1555. * strtoul: (libc)Parsing of Integers.
  1556. * strtoull: (libc)Parsing of Integers.
  1557. * strtoumax: (libc)Parsing of Integers.
  1558. * strtouq: (libc)Parsing of Integers.
  1559. * strverscmp: (libc)String/Array Comparison.
  1560. * strxfrm: (libc)Collation Functions.
  1561. * stty: (libc)BSD Terminal Modes.
  1562. * S_TYPEISMQ: (libc)Testing File Type.
  1563. * S_TYPEISSEM: (libc)Testing File Type.
  1564. * S_TYPEISSHM: (libc)Testing File Type.
  1565. * SUN_LEN: (libc)Local Namespace Details.
  1566. * swapcontext: (libc)System V contexts.
  1567. * swprintf: (libc)Formatted Output Functions.
  1568. * swscanf: (libc)Formatted Input Functions.
  1569. * symlink: (libc)Symbolic Links.
  1570. * sync: (libc)Synchronizing I/O.
  1571. * syscall: (libc)System Calls.
  1572. * sysconf: (libc)Sysconf Definition.
  1573. * sysctl: (libc)System Parameters.
  1574. * syslog: (libc)syslog; vsyslog.
  1575. * system: (libc)Running a Command.
  1576. * sysv_signal: (libc)Basic Signal Handling.
  1577. * tanf: (libc)Trig Functions.
  1578. * tanhf: (libc)Hyperbolic Functions.
  1579. * tanh: (libc)Hyperbolic Functions.
  1580. * tanhl: (libc)Hyperbolic Functions.
  1581. * tan: (libc)Trig Functions.
  1582. * tanl: (libc)Trig Functions.
  1583. * tcdrain: (libc)Line Control.
  1584. * tcflow: (libc)Line Control.
  1585. * tcflush: (libc)Line Control.
  1586. * tcgetattr: (libc)Mode Functions.
  1587. * tcgetpgrp: (libc)Terminal Access Functions.
  1588. * tcgetsid: (libc)Terminal Access Functions.
  1589. * tcsendbreak: (libc)Line Control.
  1590. * tcsetattr: (libc)Mode Functions.
  1591. * tcsetpgrp: (libc)Terminal Access Functions.
  1592. * tdelete: (libc)Tree Search Function.
  1593. * tdestroy: (libc)Tree Search Function.
  1594. * telldir: (libc)Random Access Directory.
  1595. * tempnam: (libc)Temporary Files.
  1596. * textdomain: (libc)Locating gettext catalog.
  1597. * tfind: (libc)Tree Search Function.
  1598. * tgammaf: (libc)Special Functions.
  1599. * tgamma: (libc)Special Functions.
  1600. * tgammal: (libc)Special Functions.
  1601. * timegm: (libc)Broken-down Time.
  1602. * time: (libc)Simple Calendar Time.
  1603. * timelocal: (libc)Broken-down Time.
  1604. * times: (libc)Processor Time.
  1605. * tmpfile64: (libc)Temporary Files.
  1606. * tmpfile: (libc)Temporary Files.
  1607. * TMP_MAX: (libc)Temporary Files.
  1608. * tmpnam: (libc)Temporary Files.
  1609. * tmpnam_r: (libc)Temporary Files.
  1610. * toascii: (libc)Case Conversion.
  1611. * _tolower: (libc)Case Conversion.
  1612. * tolower: (libc)Case Conversion.
  1613. * TOSTOP: (libc)Local Modes.
  1614. * totalorderf: (libc)FP Comparison Functions.
  1615. * totalorder: (libc)FP Comparison Functions.
  1616. * totalorderl: (libc)FP Comparison Functions.
  1617. * totalordermagf: (libc)FP Comparison Functions.
  1618. * totalordermag: (libc)FP Comparison Functions.
  1619. * totalordermagl: (libc)FP Comparison Functions.
  1620. * _toupper: (libc)Case Conversion.
  1621. * toupper: (libc)Case Conversion.
  1622. * towctrans: (libc)Wide Character Case Conversion.
  1623. * towlower: (libc)Wide Character Case Conversion.
  1624. * towupper: (libc)Wide Character Case Conversion.
  1625. * truncate64: (libc)File Size.
  1626. * truncate: (libc)File Size.
  1627. * truncf: (libc)Rounding Functions.
  1628. * trunc: (libc)Rounding Functions.
  1629. * truncl: (libc)Rounding Functions.
  1630. * tsearch: (libc)Tree Search Function.
  1631. * ttyname: (libc)Is It a Terminal.
  1632. * ttyname_r: (libc)Is It a Terminal.
  1633. * twalk: (libc)Tree Search Function.
  1634. * TZNAME_MAX: (libc)General Limits.
  1635. * tzset: (libc)Time Zone Functions.
  1636. * ufromfpf: (libc)Rounding Functions.
  1637. * ufromfp: (libc)Rounding Functions.
  1638. * ufromfpl: (libc)Rounding Functions.
  1639. * ufromfpxf: (libc)Rounding Functions.
  1640. * ufromfpx: (libc)Rounding Functions.
  1641. * ufromfpxl: (libc)Rounding Functions.
  1642. * ulimit: (libc)Limits on Resources.
  1643. * umask: (libc)Setting Permissions.
  1644. * umount2: (libc)Mount-Unmount-Remount.
  1645. * umount: (libc)Mount-Unmount-Remount.
  1646. * uname: (libc)Platform Type.
  1647. * ungetc: (libc)How Unread.
  1648. * ungetwc: (libc)How Unread.
  1649. * unlink: (libc)Deleting Files.
  1650. * unlockpt: (libc)Allocation.
  1651. * unsetenv: (libc)Environment Access.
  1652. * updwtmp: (libc)Manipulating the Database.
  1653. * utime: (libc)File Times.
  1654. * utimes: (libc)File Times.
  1655. * utmpname: (libc)Manipulating the Database.
  1656. * utmpxname: (libc)XPG Functions.
  1657. * va_arg: (libc)Argument Macros.
  1658. * __va_copy: (libc)Argument Macros.
  1659. * va_copy: (libc)Argument Macros.
  1660. * va_end: (libc)Argument Macros.
  1661. * valloc: (libc)Aligned Memory Blocks.
  1662. * vasprintf: (libc)Variable Arguments Output.
  1663. * va_start: (libc)Argument Macros.
  1664. * VDISCARD: (libc)Other Special.
  1665. * VDSUSP: (libc)Signal Characters.
  1666. * VEOF: (libc)Editing Characters.
  1667. * VEOL2: (libc)Editing Characters.
  1668. * VEOL: (libc)Editing Characters.
  1669. * VERASE: (libc)Editing Characters.
  1670. * verr: (libc)Error Messages.
  1671. * verrx: (libc)Error Messages.
  1672. * versionsort64: (libc)Scanning Directory Content.
  1673. * versionsort: (libc)Scanning Directory Content.
  1674. * vfork: (libc)Creating a Process.
  1675. * vfprintf: (libc)Variable Arguments Output.
  1676. * vfscanf: (libc)Variable Arguments Input.
  1677. * vfwprintf: (libc)Variable Arguments Output.
  1678. * vfwscanf: (libc)Variable Arguments Input.
  1679. * VINTR: (libc)Signal Characters.
  1680. * VKILL: (libc)Editing Characters.
  1681. * vlimit: (libc)Limits on Resources.
  1682. * VLNEXT: (libc)Other Special.
  1683. * VMIN: (libc)Noncanonical Input.
  1684. * vprintf: (libc)Variable Arguments Output.
  1685. * VQUIT: (libc)Signal Characters.
  1686. * VREPRINT: (libc)Editing Characters.
  1687. * vscanf: (libc)Variable Arguments Input.
  1688. * vsnprintf: (libc)Variable Arguments Output.
  1689. * vsprintf: (libc)Variable Arguments Output.
  1690. * vsscanf: (libc)Variable Arguments Input.
  1691. * VSTART: (libc)Start/Stop Characters.
  1692. * VSTATUS: (libc)Other Special.
  1693. * VSTOP: (libc)Start/Stop Characters.
  1694. * VSUSP: (libc)Signal Characters.
  1695. * vswprintf: (libc)Variable Arguments Output.
  1696. * vswscanf: (libc)Variable Arguments Input.
  1697. * vsyslog: (libc)syslog; vsyslog.
  1698. * VTIME: (libc)Noncanonical Input.
  1699. * vtimes: (libc)Resource Usage.
  1700. * vwarn: (libc)Error Messages.
  1701. * vwarnx: (libc)Error Messages.
  1702. * VWERASE: (libc)Editing Characters.
  1703. * vwprintf: (libc)Variable Arguments Output.
  1704. * vwscanf: (libc)Variable Arguments Input.
  1705. * wait3: (libc)BSD Wait Functions.
  1706. * wait4: (libc)Process Completion.
  1707. * wait: (libc)Process Completion.
  1708. * waitpid: (libc)Process Completion.
  1709. * warn: (libc)Error Messages.
  1710. * warnx: (libc)Error Messages.
  1711. * WCHAR_MAX: (libc)Extended Char Intro.
  1712. * WCHAR_MIN: (libc)Extended Char Intro.
  1713. * WCOREDUMP: (libc)Process Completion Status.
  1714. * wcpcpy: (libc)Copying Strings and Arrays.
  1715. * wcpncpy: (libc)Truncating Strings.
  1716. * wcrtomb: (libc)Converting a Character.
  1717. * wcscasecmp: (libc)String/Array Comparison.
  1718. * wcscat: (libc)Concatenating Strings.
  1719. * wcschr: (libc)Search Functions.
  1720. * wcschrnul: (libc)Search Functions.
  1721. * wcscmp: (libc)String/Array Comparison.
  1722. * wcscoll: (libc)Collation Functions.
  1723. * wcscpy: (libc)Copying Strings and Arrays.
  1724. * wcscspn: (libc)Search Functions.
  1725. * wcsdup: (libc)Copying Strings and Arrays.
  1726. * wcsftime: (libc)Formatting Calendar Time.
  1727. * wcslen: (libc)String Length.
  1728. * wcsncasecmp: (libc)String/Array Comparison.
  1729. * wcsncat: (libc)Truncating Strings.
  1730. * wcsncmp: (libc)String/Array Comparison.
  1731. * wcsncpy: (libc)Truncating Strings.
  1732. * wcsnlen: (libc)String Length.
  1733. * wcsnrtombs: (libc)Converting Strings.
  1734. * wcspbrk: (libc)Search Functions.
  1735. * wcsrchr: (libc)Search Functions.
  1736. * wcsrtombs: (libc)Converting Strings.
  1737. * wcsspn: (libc)Search Functions.
  1738. * wcsstr: (libc)Search Functions.
  1739. * wcstod: (libc)Parsing of Floats.
  1740. * wcstof: (libc)Parsing of Floats.
  1741. * wcstoimax: (libc)Parsing of Integers.
  1742. * wcstok: (libc)Finding Tokens in a String.
  1743. * wcstold: (libc)Parsing of Floats.
  1744. * wcstol: (libc)Parsing of Integers.
  1745. * wcstoll: (libc)Parsing of Integers.
  1746. * wcstombs: (libc)Non-reentrant String Conversion.
  1747. * wcstoq: (libc)Parsing of Integers.
  1748. * wcstoul: (libc)Parsing of Integers.
  1749. * wcstoull: (libc)Parsing of Integers.
  1750. * wcstoumax: (libc)Parsing of Integers.
  1751. * wcstouq: (libc)Parsing of Integers.
  1752. * wcswcs: (libc)Search Functions.
  1753. * wcsxfrm: (libc)Collation Functions.
  1754. * wctob: (libc)Converting a Character.
  1755. * wctomb: (libc)Non-reentrant Character Conversion.
  1756. * wctrans: (libc)Wide Character Case Conversion.
  1757. * wctype: (libc)Classification of Wide Characters.
  1758. * WEOF: (libc)EOF and Errors.
  1759. * WEOF: (libc)Extended Char Intro.
  1760. * WEXITSTATUS: (libc)Process Completion Status.
  1761. * WIFEXITED: (libc)Process Completion Status.
  1762. * WIFSIGNALED: (libc)Process Completion Status.
  1763. * WIFSTOPPED: (libc)Process Completion Status.
  1764. * wmemchr: (libc)Search Functions.
  1765. * wmemcmp: (libc)String/Array Comparison.
  1766. * wmemcpy: (libc)Copying Strings and Arrays.
  1767. * wmemmove: (libc)Copying Strings and Arrays.
  1768. * wmempcpy: (libc)Copying Strings and Arrays.
  1769. * wmemset: (libc)Copying Strings and Arrays.
  1770. * W_OK: (libc)Testing File Access.
  1771. * wordexp: (libc)Calling Wordexp.
  1772. * wordfree: (libc)Calling Wordexp.
  1773. * wprintf: (libc)Formatted Output Functions.
  1774. * write: (libc)I/O Primitives.
  1775. * writev: (libc)Scatter-Gather.
  1776. * wscanf: (libc)Formatted Input Functions.
  1777. * WSTOPSIG: (libc)Process Completion Status.
  1778. * WTERMSIG: (libc)Process Completion Status.
  1779. * X_OK: (libc)Testing File Access.
  1780. * y0f: (libc)Special Functions.
  1781. * y0: (libc)Special Functions.
  1782. * y0l: (libc)Special Functions.
  1783. * y1f: (libc)Special Functions.
  1784. * y1: (libc)Special Functions.
  1785. * y1l: (libc)Special Functions.
  1786. * ynf: (libc)Special Functions.
  1787. * yn: (libc)Special Functions.
  1788. * ynl: (libc)Special Functions.
  1789. END-INFO-DIR-ENTRY
  1790. 
  1791. File: libc.info, Node: Pseudo-Random Numbers, Next: FP Function Optimizations, Prev: Errors in Math Functions, Up: Mathematics
  1792. 19.8 Pseudo-Random Numbers
  1793. ==========================
  1794. This section describes the GNU facilities for generating a series of
  1795. pseudo-random numbers. The numbers generated are not truly random;
  1796. typically, they form a sequence that repeats periodically, with a period
  1797. so large that you can ignore it for ordinary purposes. The random
  1798. number generator works by remembering a "seed" value which it uses to
  1799. compute the next random number and also to compute a new seed.
  1800. Although the generated numbers look unpredictable within one run of a
  1801. program, the sequence of numbers is _exactly the same_ from one run to
  1802. the next. This is because the initial seed is always the same. This is
  1803. convenient when you are debugging a program, but it is unhelpful if you
  1804. want the program to behave unpredictably. If you want a different
  1805. pseudo-random series each time your program runs, you must specify a
  1806. different seed each time. For ordinary purposes, basing the seed on the
  1807. current time works well. For random numbers in cryptography, *note
  1808. Unpredictable Bytes::.
  1809. You can obtain repeatable sequences of numbers on a particular
  1810. machine type by specifying the same initial seed value for the random
  1811. number generator. There is no standard meaning for a particular seed
  1812. value; the same seed, used in different C libraries or on different CPU
  1813. types, will give you different random numbers.
  1814. The GNU C Library supports the standard ISO C random number functions
  1815. plus two other sets derived from BSD and SVID. The BSD and ISO C
  1816. functions provide identical, somewhat limited functionality. If only a
  1817. small number of random bits are required, we recommend you use the ISO C
  1818. interface, ‘rand’ and ‘srand’. The SVID functions provide a more
  1819. flexible interface, which allows better random number generator
  1820. algorithms, provides more random bits (up to 48) per call, and can
  1821. provide random floating-point numbers. These functions are required by
  1822. the XPG standard and therefore will be present in all modern Unix
  1823. systems.
  1824. * Menu:
  1825. * ISO Random:: ‘rand’ and friends.
  1826. * BSD Random:: ‘random’ and friends.
  1827. * SVID Random:: ‘drand48’ and friends.
  1828. 
  1829. File: libc.info, Node: ISO Random, Next: BSD Random, Up: Pseudo-Random Numbers
  1830. 19.8.1 ISO C Random Number Functions
  1831. ------------------------------------
  1832. This section describes the random number functions that are part of the ISO C
  1833. standard.
  1834. To use these facilities, you should include the header file
  1835. ‘stdlib.h’ in your program.
  1836. -- Macro: int RAND_MAX
  1837. The value of this macro is an integer constant representing the
  1838. largest value the ‘rand’ function can return. In the GNU C
  1839. Library, it is ‘2147483647’, which is the largest signed integer
  1840. representable in 32 bits. In other libraries, it may be as low as
  1841. ‘32767’.
  1842. -- Function: int rand (void)
  1843. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock | *Note
  1844. POSIX Safety Concepts::.
  1845. The ‘rand’ function returns the next pseudo-random number in the
  1846. series. The value ranges from ‘0’ to ‘RAND_MAX’.
  1847. -- Function: void srand (unsigned int SEED)
  1848. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock | *Note
  1849. POSIX Safety Concepts::.
  1850. This function establishes SEED as the seed for a new series of
  1851. pseudo-random numbers. If you call ‘rand’ before a seed has been
  1852. established with ‘srand’, it uses the value ‘1’ as a default seed.
  1853. To produce a different pseudo-random series each time your program
  1854. is run, do ‘srand (time (0))’.
  1855. POSIX.1 extended the C standard functions to support reproducible
  1856. random numbers in multi-threaded programs. However, the extension is
  1857. badly designed and unsuitable for serious work.
  1858. -- Function: int rand_r (unsigned int *SEED)
  1859. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  1860. Concepts::.
  1861. This function returns a random number in the range 0 to ‘RAND_MAX’
  1862. just as ‘rand’ does. However, all its state is stored in the SEED
  1863. argument. This means the RNG’s state can only have as many bits as
  1864. the type ‘unsigned int’ has. This is far too few to provide a good
  1865. RNG.
  1866. If your program requires a reentrant RNG, we recommend you use the
  1867. reentrant GNU extensions to the SVID random number generator. The
  1868. POSIX.1 interface should only be used when the GNU extensions are
  1869. not available.
  1870. 
  1871. File: libc.info, Node: BSD Random, Next: SVID Random, Prev: ISO Random, Up: Pseudo-Random Numbers
  1872. 19.8.2 BSD Random Number Functions
  1873. ----------------------------------
  1874. This section describes a set of random number generation functions that
  1875. are derived from BSD. There is no advantage to using these functions
  1876. with the GNU C Library; we support them for BSD compatibility only.
  1877. The prototypes for these functions are in ‘stdlib.h’.
  1878. -- Function: long int random (void)
  1879. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock | *Note
  1880. POSIX Safety Concepts::.
  1881. This function returns the next pseudo-random number in the
  1882. sequence. The value returned ranges from ‘0’ to ‘2147483647’.
  1883. *NB:* Temporarily this function was defined to return a ‘int32_t’
  1884. value to indicate that the return value always contains 32 bits
  1885. even if ‘long int’ is wider. The standard demands it differently.
  1886. Users must always be aware of the 32-bit limitation, though.
  1887. -- Function: void srandom (unsigned int SEED)
  1888. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock | *Note
  1889. POSIX Safety Concepts::.
  1890. The ‘srandom’ function sets the state of the random number
  1891. generator based on the integer SEED. If you supply a SEED value of
  1892. ‘1’, this will cause ‘random’ to reproduce the default set of
  1893. random numbers.
  1894. To produce a different set of pseudo-random numbers each time your
  1895. program runs, do ‘srandom (time (0))’.
  1896. -- Function: char * initstate (unsigned int SEED, char *STATE, size_t
  1897. SIZE)
  1898. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock | *Note
  1899. POSIX Safety Concepts::.
  1900. The ‘initstate’ function is used to initialize the random number
  1901. generator state. The argument STATE is an array of SIZE bytes,
  1902. used to hold the state information. It is initialized based on
  1903. SEED. The size must be between 8 and 256 bytes, and should be a
  1904. power of two. The bigger the STATE array, the better.
  1905. The return value is the previous value of the state information
  1906. array. You can use this value later as an argument to ‘setstate’
  1907. to restore that state.
  1908. -- Function: char * setstate (char *STATE)
  1909. Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock | *Note
  1910. POSIX Safety Concepts::.
  1911. The ‘setstate’ function restores the random number state
  1912. information STATE. The argument must have been the result of a
  1913. previous call to INITSTATE or SETSTATE.
  1914. The return value is the previous value of the state information
  1915. array. You can use this value later as an argument to ‘setstate’
  1916. to restore that state.
  1917. If the function fails the return value is ‘NULL’.
  1918. The four functions described so far in this section all work on a
  1919. state which is shared by all threads. The state is not directly
  1920. accessible to the user and can only be modified by these functions.
  1921. This makes it hard to deal with situations where each thread should have
  1922. its own pseudo-random number generator.
  1923. The GNU C Library contains four additional functions which contain
  1924. the state as an explicit parameter and therefore make it possible to
  1925. handle thread-local PRNGs. Besides this there is no difference. In
  1926. fact, the four functions already discussed are implemented internally
  1927. using the following interfaces.
  1928. The ‘stdlib.h’ header contains a definition of the following type:
  1929. -- Data Type: struct random_data
  1930. Objects of type ‘struct random_data’ contain the information
  1931. necessary to represent the state of the PRNG. Although a complete
  1932. definition of the type is present the type should be treated as
  1933. opaque.
  1934. The functions modifying the state follow exactly the already
  1935. described functions.
  1936. -- Function: int random_r (struct random_data *restrict BUF, int32_t
  1937. *restrict RESULT)
  1938. Preliminary: | MT-Safe race:buf | AS-Safe | AC-Unsafe corrupt |
  1939. *Note POSIX Safety Concepts::.
  1940. The ‘random_r’ function behaves exactly like the ‘random’ function
  1941. except that it uses and modifies the state in the object pointed to
  1942. by the first parameter instead of the global state.
  1943. -- Function: int srandom_r (unsigned int SEED, struct random_data *BUF)
  1944. Preliminary: | MT-Safe race:buf | AS-Safe | AC-Unsafe corrupt |
  1945. *Note POSIX Safety Concepts::.
  1946. The ‘srandom_r’ function behaves exactly like the ‘srandom’
  1947. function except that it uses and modifies the state in the object
  1948. pointed to by the second parameter instead of the global state.
  1949. -- Function: int initstate_r (unsigned int SEED, char *restrict
  1950. STATEBUF, size_t STATELEN, struct random_data *restrict BUF)
  1951. Preliminary: | MT-Safe race:buf | AS-Safe | AC-Unsafe corrupt |
  1952. *Note POSIX Safety Concepts::.
  1953. The ‘initstate_r’ function behaves exactly like the ‘initstate’
  1954. function except that it uses and modifies the state in the object
  1955. pointed to by the fourth parameter instead of the global state.
  1956. -- Function: int setstate_r (char *restrict STATEBUF, struct
  1957. random_data *restrict BUF)
  1958. Preliminary: | MT-Safe race:buf | AS-Safe | AC-Unsafe corrupt |
  1959. *Note POSIX Safety Concepts::.
  1960. The ‘setstate_r’ function behaves exactly like the ‘setstate’
  1961. function except that it uses and modifies the state in the object
  1962. pointed to by the first parameter instead of the global state.
  1963. 
  1964. File: libc.info, Node: SVID Random, Prev: BSD Random, Up: Pseudo-Random Numbers
  1965. 19.8.3 SVID Random Number Function
  1966. ----------------------------------
  1967. The C library on SVID systems contains yet another kind of random number
  1968. generator functions. They use a state of 48 bits of data. The user can
  1969. choose among a collection of functions which return the random bits in
  1970. different forms.
  1971. Generally there are two kinds of function. The first uses a state of
  1972. the random number generator which is shared among several functions and
  1973. by all threads of the process. The second requires the user to handle
  1974. the state.
  1975. All functions have in common that they use the same congruential
  1976. formula with the same constants. The formula is
  1977. Y = (a * X + c) mod m
  1978. where X is the state of the generator at the beginning and Y the state
  1979. at the end. ‘a’ and ‘c’ are constants determining the way the generator
  1980. works. By default they are
  1981. a = 0x5DEECE66D = 25214903917
  1982. c = 0xb = 11
  1983. but they can also be changed by the user. ‘m’ is of course 2^48 since
  1984. the state consists of a 48-bit array.
  1985. The prototypes for these functions are in ‘stdlib.h’.
  1986. -- Function: double drand48 (void)
  1987. Preliminary: | MT-Unsafe race:drand48 | AS-Unsafe | AC-Unsafe
  1988. corrupt | *Note POSIX Safety Concepts::.
  1989. This function returns a ‘double’ value in the range of ‘0.0’ to
  1990. ‘1.0’ (exclusive). The random bits are determined by the global
  1991. state of the random number generator in the C library.
  1992. Since the ‘double’ type according to IEEE 754 has a 52-bit mantissa
  1993. this means 4 bits are not initialized by the random number
  1994. generator. These are (of course) chosen to be the least
  1995. significant bits and they are initialized to ‘0’.
  1996. -- Function: double erand48 (unsigned short int XSUBI[3])
  1997. Preliminary: | MT-Unsafe race:drand48 | AS-Unsafe | AC-Unsafe
  1998. corrupt | *Note POSIX Safety Concepts::.
  1999. This function returns a ‘double’ value in the range of ‘0.0’ to
  2000. ‘1.0’ (exclusive), similarly to ‘drand48’. The argument is an
  2001. array describing the state of the random number generator.
  2002. This function can be called subsequently since it updates the array
  2003. to guarantee random numbers. The array should have been
  2004. initialized before initial use to obtain reproducible results.
  2005. -- Function: long int lrand48 (void)
  2006. Preliminary: | MT-Unsafe race:drand48 | AS-Unsafe | AC-Unsafe
  2007. corrupt | *Note POSIX Safety Concepts::.
  2008. The ‘lrand48’ function returns an integer value in the range of ‘0’
  2009. to ‘2^31’ (exclusive). Even if the size of the ‘long int’ type can
  2010. take more than 32 bits, no higher numbers are returned. The random
  2011. bits are determined by the global state of the random number
  2012. generator in the C library.
  2013. -- Function: long int nrand48 (unsigned short int XSUBI[3])
  2014. Preliminary: | MT-Unsafe race:drand48 | AS-Unsafe | AC-Unsafe
  2015. corrupt | *Note POSIX Safety Concepts::.
  2016. This function is similar to the ‘lrand48’ function in that it
  2017. returns a number in the range of ‘0’ to ‘2^31’ (exclusive) but the
  2018. state of the random number generator used to produce the random
  2019. bits is determined by the array provided as the parameter to the
  2020. function.
  2021. The numbers in the array are updated afterwards so that subsequent
  2022. calls to this function yield different results (as is expected of a
  2023. random number generator). The array should have been initialized
  2024. before the first call to obtain reproducible results.
  2025. -- Function: long int mrand48 (void)
  2026. Preliminary: | MT-Unsafe race:drand48 | AS-Unsafe | AC-Unsafe
  2027. corrupt | *Note POSIX Safety Concepts::.
  2028. The ‘mrand48’ function is similar to ‘lrand48’. The only
  2029. difference is that the numbers returned are in the range ‘-2^31’ to
  2030. ‘2^31’ (exclusive).
  2031. -- Function: long int jrand48 (unsigned short int XSUBI[3])
  2032. Preliminary: | MT-Unsafe race:drand48 | AS-Unsafe | AC-Unsafe
  2033. corrupt | *Note POSIX Safety Concepts::.
  2034. The ‘jrand48’ function is similar to ‘nrand48’. The only
  2035. difference is that the numbers returned are in the range ‘-2^31’ to
  2036. ‘2^31’ (exclusive). For the ‘xsubi’ parameter the same
  2037. requirements are necessary.
  2038. The internal state of the random number generator can be initialized
  2039. in several ways. The methods differ in the completeness of the
  2040. information provided.
  2041. -- Function: void srand48 (long int SEEDVAL)
  2042. Preliminary: | MT-Unsafe race:drand48 | AS-Unsafe | AC-Unsafe
  2043. corrupt | *Note POSIX Safety Concepts::.
  2044. The ‘srand48’ function sets the most significant 32 bits of the
  2045. internal state of the random number generator to the least
  2046. significant 32 bits of the SEEDVAL parameter. The lower 16 bits
  2047. are initialized to the value ‘0x330E’. Even if the ‘long int’ type
  2048. contains more than 32 bits only the lower 32 bits are used.
  2049. Owing to this limitation, initialization of the state of this
  2050. function is not very useful. But it makes it easy to use a
  2051. construct like ‘srand48 (time (0))’.
  2052. A side-effect of this function is that the values ‘a’ and ‘c’ from
  2053. the internal state, which are used in the congruential formula, are
  2054. reset to the default values given above. This is of importance
  2055. once the user has called the ‘lcong48’ function (see below).
  2056. -- Function: unsigned short int * seed48 (unsigned short int
  2057. SEED16V[3])
  2058. Preliminary: | MT-Unsafe race:drand48 | AS-Unsafe | AC-Unsafe
  2059. corrupt | *Note POSIX Safety Concepts::.
  2060. The ‘seed48’ function initializes all 48 bits of the state of the
  2061. internal random number generator from the contents of the parameter
  2062. SEED16V. Here the lower 16 bits of the first element of SEED16V
  2063. initialize the least significant 16 bits of the internal state, the
  2064. lower 16 bits of ‘SEED16V[1]’ initialize the mid-order 16 bits of
  2065. the state and the 16 lower bits of ‘SEED16V[2]’ initialize the most
  2066. significant 16 bits of the state.
  2067. Unlike ‘srand48’ this function lets the user initialize all 48 bits
  2068. of the state.
  2069. The value returned by ‘seed48’ is a pointer to an array containing
  2070. the values of the internal state before the change. This might be
  2071. useful to restart the random number generator at a certain state.
  2072. Otherwise the value can simply be ignored.
  2073. As for ‘srand48’, the values ‘a’ and ‘c’ from the congruential
  2074. formula are reset to the default values.
  2075. There is one more function to initialize the random number generator
  2076. which enables you to specify even more information by allowing you to
  2077. change the parameters in the congruential formula.
  2078. -- Function: void lcong48 (unsigned short int PARAM[7])
  2079. Preliminary: | MT-Unsafe race:drand48 | AS-Unsafe | AC-Unsafe
  2080. corrupt | *Note POSIX Safety Concepts::.
  2081. The ‘lcong48’ function allows the user to change the complete state
  2082. of the random number generator. Unlike ‘srand48’ and ‘seed48’,
  2083. this function also changes the constants in the congruential
  2084. formula.
  2085. From the seven elements in the array PARAM the least significant 16
  2086. bits of the entries ‘PARAM[0]’ to ‘PARAM[2]’ determine the initial
  2087. state, the least significant 16 bits of ‘PARAM[3]’ to ‘PARAM[5]’
  2088. determine the 48 bit constant ‘a’ and ‘PARAM[6]’ determines the
  2089. 16-bit value ‘c’.
  2090. All the above functions have in common that they use the global
  2091. parameters for the congruential formula. In multi-threaded programs it
  2092. might sometimes be useful to have different parameters in different
  2093. threads. For this reason all the above functions have a counterpart
  2094. which works on a description of the random number generator in the
  2095. user-supplied buffer instead of the global state.
  2096. Please note that it is no problem if several threads use the global
  2097. state if all threads use the functions which take a pointer to an array
  2098. containing the state. The random numbers are computed following the
  2099. same loop but if the state in the array is different all threads will
  2100. obtain an individual random number generator.
  2101. The user-supplied buffer must be of type ‘struct drand48_data’. This
  2102. type should be regarded as opaque and not manipulated directly.
  2103. -- Function: int drand48_r (struct drand48_data *BUFFER, double
  2104. *RESULT)
  2105. Preliminary: | MT-Safe race:buffer | AS-Safe | AC-Unsafe corrupt |
  2106. *Note POSIX Safety Concepts::.
  2107. This function is equivalent to the ‘drand48’ function with the
  2108. difference that it does not modify the global random number
  2109. generator parameters but instead the parameters in the buffer
  2110. supplied through the pointer BUFFER. The random number is returned
  2111. in the variable pointed to by RESULT.
  2112. The return value of the function indicates whether the call
  2113. succeeded. If the value is less than ‘0’ an error occurred and
  2114. ERRNO is set to indicate the problem.
  2115. This function is a GNU extension and should not be used in portable
  2116. programs.
  2117. -- Function: int erand48_r (unsigned short int XSUBI[3], struct
  2118. drand48_data *BUFFER, double *RESULT)
  2119. Preliminary: | MT-Safe race:buffer | AS-Safe | AC-Unsafe corrupt |
  2120. *Note POSIX Safety Concepts::.
  2121. The ‘erand48_r’ function works like ‘erand48’, but in addition it
  2122. takes an argument BUFFER which describes the random number
  2123. generator. The state of the random number generator is taken from
  2124. the ‘xsubi’ array, the parameters for the congruential formula from
  2125. the global random number generator data. The random number is
  2126. returned in the variable pointed to by RESULT.
  2127. The return value is non-negative if the call succeeded.
  2128. This function is a GNU extension and should not be used in portable
  2129. programs.
  2130. -- Function: int lrand48_r (struct drand48_data *BUFFER, long int
  2131. *RESULT)
  2132. Preliminary: | MT-Safe race:buffer | AS-Safe | AC-Unsafe corrupt |
  2133. *Note POSIX Safety Concepts::.
  2134. This function is similar to ‘lrand48’, but in addition it takes a
  2135. pointer to a buffer describing the state of the random number
  2136. generator just like ‘drand48’.
  2137. If the return value of the function is non-negative the variable
  2138. pointed to by RESULT contains the result. Otherwise an error
  2139. occurred.
  2140. This function is a GNU extension and should not be used in portable
  2141. programs.
  2142. -- Function: int nrand48_r (unsigned short int XSUBI[3], struct
  2143. drand48_data *BUFFER, long int *RESULT)
  2144. Preliminary: | MT-Safe race:buffer | AS-Safe | AC-Unsafe corrupt |
  2145. *Note POSIX Safety Concepts::.
  2146. The ‘nrand48_r’ function works like ‘nrand48’ in that it produces a
  2147. random number in the range ‘0’ to ‘2^31’. But instead of using the
  2148. global parameters for the congruential formula it uses the
  2149. information from the buffer pointed to by BUFFER. The state is
  2150. described by the values in XSUBI.
  2151. If the return value is non-negative the variable pointed to by
  2152. RESULT contains the result.
  2153. This function is a GNU extension and should not be used in portable
  2154. programs.
  2155. -- Function: int mrand48_r (struct drand48_data *BUFFER, long int
  2156. *RESULT)
  2157. Preliminary: | MT-Safe race:buffer | AS-Safe | AC-Unsafe corrupt |
  2158. *Note POSIX Safety Concepts::.
  2159. This function is similar to ‘mrand48’ but like the other reentrant
  2160. functions it uses the random number generator described by the
  2161. value in the buffer pointed to by BUFFER.
  2162. If the return value is non-negative the variable pointed to by
  2163. RESULT contains the result.
  2164. This function is a GNU extension and should not be used in portable
  2165. programs.
  2166. -- Function: int jrand48_r (unsigned short int XSUBI[3], struct
  2167. drand48_data *BUFFER, long int *RESULT)
  2168. Preliminary: | MT-Safe race:buffer | AS-Safe | AC-Unsafe corrupt |
  2169. *Note POSIX Safety Concepts::.
  2170. The ‘jrand48_r’ function is similar to ‘jrand48’. Like the other
  2171. reentrant functions of this function family it uses the
  2172. congruential formula parameters from the buffer pointed to by
  2173. BUFFER.
  2174. If the return value is non-negative the variable pointed to by
  2175. RESULT contains the result.
  2176. This function is a GNU extension and should not be used in portable
  2177. programs.
  2178. Before any of the above functions are used the buffer of type ‘struct
  2179. drand48_data’ should be initialized. The easiest way to do this is to
  2180. fill the whole buffer with null bytes, e.g. by
  2181. memset (buffer, '\0', sizeof (struct drand48_data));
  2182. Using any of the reentrant functions of this family now will
  2183. automatically initialize the random number generator to the default
  2184. values for the state and the parameters of the congruential formula.
  2185. The other possibility is to use any of the functions which explicitly
  2186. initialize the buffer. Though it might be obvious how to initialize the
  2187. buffer from looking at the parameter to the function, it is highly
  2188. recommended to use these functions since the result might not always be
  2189. what you expect.
  2190. -- Function: int srand48_r (long int SEEDVAL, struct drand48_data
  2191. *BUFFER)
  2192. Preliminary: | MT-Safe race:buffer | AS-Safe | AC-Unsafe corrupt |
  2193. *Note POSIX Safety Concepts::.
  2194. The description of the random number generator represented by the
  2195. information in BUFFER is initialized similarly to what the function
  2196. ‘srand48’ does. The state is initialized from the parameter
  2197. SEEDVAL and the parameters for the congruential formula are
  2198. initialized to their default values.
  2199. If the return value is non-negative the function call succeeded.
  2200. This function is a GNU extension and should not be used in portable
  2201. programs.
  2202. -- Function: int seed48_r (unsigned short int SEED16V[3], struct
  2203. drand48_data *BUFFER)
  2204. Preliminary: | MT-Safe race:buffer | AS-Safe | AC-Unsafe corrupt |
  2205. *Note POSIX Safety Concepts::.
  2206. This function is similar to ‘srand48_r’ but like ‘seed48’ it
  2207. initializes all 48 bits of the state from the parameter SEED16V.
  2208. If the return value is non-negative the function call succeeded.
  2209. It does not return a pointer to the previous state of the random
  2210. number generator like the ‘seed48’ function does. If the user
  2211. wants to preserve the state for a later re-run s/he can copy the
  2212. whole buffer pointed to by BUFFER.
  2213. This function is a GNU extension and should not be used in portable
  2214. programs.
  2215. -- Function: int lcong48_r (unsigned short int PARAM[7], struct
  2216. drand48_data *BUFFER)
  2217. Preliminary: | MT-Safe race:buffer | AS-Safe | AC-Unsafe corrupt |
  2218. *Note POSIX Safety Concepts::.
  2219. This function initializes all aspects of the random number
  2220. generator described in BUFFER with the data in PARAM. Here it is
  2221. especially true that the function does more than just copying the
  2222. contents of PARAM and BUFFER. More work is required and therefore
  2223. it is important to use this function rather than initializing the
  2224. random number generator directly.
  2225. If the return value is non-negative the function call succeeded.
  2226. This function is a GNU extension and should not be used in portable
  2227. programs.
  2228. 
  2229. File: libc.info, Node: FP Function Optimizations, Prev: Pseudo-Random Numbers, Up: Mathematics
  2230. 19.9 Is Fast Code or Small Code preferred?
  2231. ==========================================
  2232. If an application uses many floating point functions it is often the
  2233. case that the cost of the function calls themselves is not negligible.
  2234. Modern processors can often execute the operations themselves very fast,
  2235. but the function call disrupts the instruction pipeline.
  2236. For this reason the GNU C Library provides optimizations for many of
  2237. the frequently-used math functions. When GNU CC is used and the user
  2238. activates the optimizer, several new inline functions and macros are
  2239. defined. These new functions and macros have the same names as the
  2240. library functions and so are used instead of the latter. In the case of
  2241. inline functions the compiler will decide whether it is reasonable to
  2242. use them, and this decision is usually correct.
  2243. This means that no calls to the library functions may be necessary,
  2244. and can increase the speed of generated code significantly. The
  2245. drawback is that code size will increase, and the increase is not always
  2246. negligible.
  2247. There are two kinds of inline functions: those that give the same
  2248. result as the library functions and others that might not set ‘errno’
  2249. and might have a reduced precision and/or argument range in comparison
  2250. with the library functions. The latter inline functions are only
  2251. available if the flag ‘-ffast-math’ is given to GNU CC.
  2252. In cases where the inline functions and macros are not wanted the
  2253. symbol ‘__NO_MATH_INLINES’ should be defined before any system header is
  2254. included. This will ensure that only library functions are used. Of
  2255. course, it can be determined for each file in the project whether giving
  2256. this option is preferable or not.
  2257. Not all hardware implements the entire IEEE 754 standard, and even if
  2258. it does there may be a substantial performance penalty for using some of
  2259. its features. For example, enabling traps on some processors forces the
  2260. FPU to run un-pipelined, which can more than double calculation time.
  2261. 
  2262. File: libc.info, Node: Arithmetic, Next: Date and Time, Prev: Mathematics, Up: Top
  2263. 20 Arithmetic Functions
  2264. ***********************
  2265. This chapter contains information about functions for doing basic
  2266. arithmetic operations, such as splitting a float into its integer and
  2267. fractional parts or retrieving the imaginary part of a complex value.
  2268. These functions are declared in the header files ‘math.h’ and
  2269. ‘complex.h’.
  2270. * Menu:
  2271. * Integers:: Basic integer types and concepts
  2272. * Integer Division:: Integer division with guaranteed rounding.
  2273. * Floating Point Numbers:: Basic concepts. IEEE 754.
  2274. * Floating Point Classes:: The five kinds of floating-point number.
  2275. * Floating Point Errors:: When something goes wrong in a calculation.
  2276. * Rounding:: Controlling how results are rounded.
  2277. * Control Functions:: Saving and restoring the FPU’s state.
  2278. * Arithmetic Functions:: Fundamental operations provided by the library.
  2279. * Complex Numbers:: The types. Writing complex constants.
  2280. * Operations on Complex:: Projection, conjugation, decomposition.
  2281. * Parsing of Numbers:: Converting strings to numbers.
  2282. * Printing of Floats:: Converting floating-point numbers to strings.
  2283. * System V Number Conversion:: An archaic way to convert numbers to strings.
  2284. 
  2285. File: libc.info, Node: Integers, Next: Integer Division, Up: Arithmetic
  2286. 20.1 Integers
  2287. =============
  2288. The C language defines several integer data types: integer, short
  2289. integer, long integer, and character, all in both signed and unsigned
  2290. varieties. The GNU C compiler extends the language to contain long long
  2291. integers as well.
  2292. The C integer types were intended to allow code to be portable among
  2293. machines with different inherent data sizes (word sizes), so each type
  2294. may have different ranges on different machines. The problem with this
  2295. is that a program often needs to be written for a particular range of
  2296. integers, and sometimes must be written for a particular size of
  2297. storage, regardless of what machine the program runs on.
  2298. To address this problem, the GNU C Library contains C type
  2299. definitions you can use to declare integers that meet your exact needs.
  2300. Because the GNU C Library header files are customized to a specific
  2301. machine, your program source code doesn’t have to be.
  2302. These ‘typedef’s are in ‘stdint.h’.
  2303. If you require that an integer be represented in exactly N bits, use
  2304. one of the following types, with the obvious mapping to bit size and
  2305. signedness:
  2306. • int8_t
  2307. • int16_t
  2308. • int32_t
  2309. • int64_t
  2310. • uint8_t
  2311. • uint16_t
  2312. • uint32_t
  2313. • uint64_t
  2314. If your C compiler and target machine do not allow integers of a
  2315. certain size, the corresponding above type does not exist.
  2316. If you don’t need a specific storage size, but want the smallest data
  2317. structure with _at least_ N bits, use one of these:
  2318. • int_least8_t
  2319. • int_least16_t
  2320. • int_least32_t
  2321. • int_least64_t
  2322. • uint_least8_t
  2323. • uint_least16_t
  2324. • uint_least32_t
  2325. • uint_least64_t
  2326. If you don’t need a specific storage size, but want the data
  2327. structure that allows the fastest access while having at least N bits
  2328. (and among data structures with the same access speed, the smallest
  2329. one), use one of these:
  2330. • int_fast8_t
  2331. • int_fast16_t
  2332. • int_fast32_t
  2333. • int_fast64_t
  2334. • uint_fast8_t
  2335. • uint_fast16_t
  2336. • uint_fast32_t
  2337. • uint_fast64_t
  2338. If you want an integer with the widest range possible on the platform
  2339. on which it is being used, use one of the following. If you use these,
  2340. you should write code that takes into account the variable size and
  2341. range of the integer.
  2342. • intmax_t
  2343. • uintmax_t
  2344. The GNU C Library also provides macros that tell you the maximum and
  2345. minimum possible values for each integer data type. The macro names
  2346. follow these examples: ‘INT32_MAX’, ‘UINT8_MAX’, ‘INT_FAST32_MIN’,
  2347. ‘INT_LEAST64_MIN’, ‘UINTMAX_MAX’, ‘INTMAX_MAX’, ‘INTMAX_MIN’. Note that
  2348. there are no macros for unsigned integer minima. These are always zero.
  2349. Similiarly, there are macros such as ‘INTMAX_WIDTH’ for the width of
  2350. these types. Those macros for integer type widths come from TS
  2351. 18661-1:2014.
  2352. There are similar macros for use with C’s built in integer types
  2353. which should come with your C compiler. These are described in *note
  2354. Data Type Measurements::.
  2355. Don’t forget you can use the C ‘sizeof’ function with any of these
  2356. data types to get the number of bytes of storage each uses.
  2357. 
  2358. File: libc.info, Node: Integer Division, Next: Floating Point Numbers, Prev: Integers, Up: Arithmetic
  2359. 20.2 Integer Division
  2360. =====================
  2361. This section describes functions for performing integer division. These
  2362. functions are redundant when GNU CC is used, because in GNU C the ‘/’
  2363. operator always rounds towards zero. But in other C implementations,
  2364. ‘/’ may round differently with negative arguments. ‘div’ and ‘ldiv’ are
  2365. useful because they specify how to round the quotient: towards zero.
  2366. The remainder has the same sign as the numerator.
  2367. These functions are specified to return a result R such that the
  2368. value ‘R.quot*DENOMINATOR + R.rem’ equals NUMERATOR.
  2369. To use these facilities, you should include the header file
  2370. ‘stdlib.h’ in your program.
  2371. -- Data Type: div_t
  2372. This is a structure type used to hold the result returned by the
  2373. ‘div’ function. It has the following members:
  2374. ‘int quot’
  2375. The quotient from the division.
  2376. ‘int rem’
  2377. The remainder from the division.
  2378. -- Function: div_t div (int NUMERATOR, int DENOMINATOR)
  2379. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2380. Concepts::.
  2381. The function ‘div’ computes the quotient and remainder from the
  2382. division of NUMERATOR by DENOMINATOR, returning the result in a
  2383. structure of type ‘div_t’.
  2384. If the result cannot be represented (as in a division by zero), the
  2385. behavior is undefined.
  2386. Here is an example, albeit not a very useful one.
  2387. div_t result;
  2388. result = div (20, -6);
  2389. Now ‘result.quot’ is ‘-3’ and ‘result.rem’ is ‘2’.
  2390. -- Data Type: ldiv_t
  2391. This is a structure type used to hold the result returned by the
  2392. ‘ldiv’ function. It has the following members:
  2393. ‘long int quot’
  2394. The quotient from the division.
  2395. ‘long int rem’
  2396. The remainder from the division.
  2397. (This is identical to ‘div_t’ except that the components are of
  2398. type ‘long int’ rather than ‘int’.)
  2399. -- Function: ldiv_t ldiv (long int NUMERATOR, long int DENOMINATOR)
  2400. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2401. Concepts::.
  2402. The ‘ldiv’ function is similar to ‘div’, except that the arguments
  2403. are of type ‘long int’ and the result is returned as a structure of
  2404. type ‘ldiv_t’.
  2405. -- Data Type: lldiv_t
  2406. This is a structure type used to hold the result returned by the
  2407. ‘lldiv’ function. It has the following members:
  2408. ‘long long int quot’
  2409. The quotient from the division.
  2410. ‘long long int rem’
  2411. The remainder from the division.
  2412. (This is identical to ‘div_t’ except that the components are of
  2413. type ‘long long int’ rather than ‘int’.)
  2414. -- Function: lldiv_t lldiv (long long int NUMERATOR, long long int
  2415. DENOMINATOR)
  2416. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2417. Concepts::.
  2418. The ‘lldiv’ function is like the ‘div’ function, but the arguments
  2419. are of type ‘long long int’ and the result is returned as a
  2420. structure of type ‘lldiv_t’.
  2421. The ‘lldiv’ function was added in ISO C99.
  2422. -- Data Type: imaxdiv_t
  2423. This is a structure type used to hold the result returned by the
  2424. ‘imaxdiv’ function. It has the following members:
  2425. ‘intmax_t quot’
  2426. The quotient from the division.
  2427. ‘intmax_t rem’
  2428. The remainder from the division.
  2429. (This is identical to ‘div_t’ except that the components are of
  2430. type ‘intmax_t’ rather than ‘int’.)
  2431. See *note Integers:: for a description of the ‘intmax_t’ type.
  2432. -- Function: imaxdiv_t imaxdiv (intmax_t NUMERATOR, intmax_t
  2433. DENOMINATOR)
  2434. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2435. Concepts::.
  2436. The ‘imaxdiv’ function is like the ‘div’ function, but the
  2437. arguments are of type ‘intmax_t’ and the result is returned as a
  2438. structure of type ‘imaxdiv_t’.
  2439. See *note Integers:: for a description of the ‘intmax_t’ type.
  2440. The ‘imaxdiv’ function was added in ISO C99.
  2441. 
  2442. File: libc.info, Node: Floating Point Numbers, Next: Floating Point Classes, Prev: Integer Division, Up: Arithmetic
  2443. 20.3 Floating Point Numbers
  2444. ===========================
  2445. Most computer hardware has support for two different kinds of numbers:
  2446. integers (…-3, -2, -1, 0, 1, 2, 3…) and floating-point numbers.
  2447. Floating-point numbers have three parts: the "mantissa", the "exponent",
  2448. and the "sign bit". The real number represented by a floating-point
  2449. value is given by (s ? -1 : 1) * 2^e * M where s is the sign bit, e the
  2450. exponent, and M the mantissa. *Note Floating Point Concepts::, for
  2451. details. (It is possible to have a different "base" for the exponent,
  2452. but all modern hardware uses 2.)
  2453. Floating-point numbers can represent a finite subset of the real
  2454. numbers. While this subset is large enough for most purposes, it is
  2455. important to remember that the only reals that can be represented
  2456. exactly are rational numbers that have a terminating binary expansion
  2457. shorter than the width of the mantissa. Even simple fractions such as
  2458. 1/5 can only be approximated by floating point.
  2459. Mathematical operations and functions frequently need to produce
  2460. values that are not representable. Often these values can be
  2461. approximated closely enough for practical purposes, but sometimes they
  2462. can’t. Historically there was no way to tell when the results of a
  2463. calculation were inaccurate. Modern computers implement the IEEE 754
  2464. standard for numerical computations, which defines a framework for
  2465. indicating to the program when the results of calculation are not
  2466. trustworthy. This framework consists of a set of "exceptions" that
  2467. indicate why a result could not be represented, and the special values
  2468. "infinity" and "not a number" (NaN).
  2469. 
  2470. File: libc.info, Node: Floating Point Classes, Next: Floating Point Errors, Prev: Floating Point Numbers, Up: Arithmetic
  2471. 20.4 Floating-Point Number Classification Functions
  2472. ===================================================
  2473. ISO C99 defines macros that let you determine what sort of
  2474. floating-point number a variable holds.
  2475. -- Macro: int fpclassify (_float-type_ X)
  2476. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2477. Concepts::.
  2478. This is a generic macro which works on all floating-point types and
  2479. which returns a value of type ‘int’. The possible values are:
  2480. ‘FP_NAN’
  2481. The floating-point number X is “Not a Number” (*note Infinity
  2482. and NaN::)
  2483. ‘FP_INFINITE’
  2484. The value of X is either plus or minus infinity (*note
  2485. Infinity and NaN::)
  2486. ‘FP_ZERO’
  2487. The value of X is zero. In floating-point formats like
  2488. IEEE 754, where zero can be signed, this value is also
  2489. returned if X is negative zero.
  2490. ‘FP_SUBNORMAL’
  2491. Numbers whose absolute value is too small to be represented in
  2492. the normal format are represented in an alternate,
  2493. "denormalized" format (*note Floating Point Concepts::). This
  2494. format is less precise but can represent values closer to
  2495. zero. ‘fpclassify’ returns this value for values of X in this
  2496. alternate format.
  2497. ‘FP_NORMAL’
  2498. This value is returned for all other values of X. It
  2499. indicates that there is nothing special about the number.
  2500. ‘fpclassify’ is most useful if more than one property of a number
  2501. must be tested. There are more specific macros which only test one
  2502. property at a time. Generally these macros execute faster than
  2503. ‘fpclassify’, since there is special hardware support for them. You
  2504. should therefore use the specific macros whenever possible.
  2505. -- Macro: int iscanonical (_float-type_ X)
  2506. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2507. Concepts::.
  2508. In some floating-point formats, some values have canonical
  2509. (preferred) and noncanonical encodings (for IEEE interchange binary
  2510. formats, all encodings are canonical). This macro returns a
  2511. nonzero value if X has a canonical encoding. It is from TS
  2512. 18661-1:2014.
  2513. Note that some formats have multiple encodings of a value which are
  2514. all equally canonical; ‘iscanonical’ returns a nonzero value for
  2515. all such encodings. Also, formats may have encodings that do not
  2516. correspond to any valid value of the type. In ISO C terms these
  2517. are "trap representations"; in the GNU C Library, ‘iscanonical’
  2518. returns zero for such encodings.
  2519. -- Macro: int isfinite (_float-type_ X)
  2520. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2521. Concepts::.
  2522. This macro returns a nonzero value if X is finite: not plus or
  2523. minus infinity, and not NaN. It is equivalent to
  2524. (fpclassify (x) != FP_NAN && fpclassify (x) != FP_INFINITE)
  2525. ‘isfinite’ is implemented as a macro which accepts any
  2526. floating-point type.
  2527. -- Macro: int isnormal (_float-type_ X)
  2528. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2529. Concepts::.
  2530. This macro returns a nonzero value if X is finite and normalized.
  2531. It is equivalent to
  2532. (fpclassify (x) == FP_NORMAL)
  2533. -- Macro: int isnan (_float-type_ X)
  2534. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2535. Concepts::.
  2536. This macro returns a nonzero value if X is NaN. It is equivalent to
  2537. (fpclassify (x) == FP_NAN)
  2538. -- Macro: int issignaling (_float-type_ X)
  2539. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2540. Concepts::.
  2541. This macro returns a nonzero value if X is a signaling NaN (sNaN).
  2542. It is from TS 18661-1:2014.
  2543. -- Macro: int issubnormal (_float-type_ X)
  2544. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2545. Concepts::.
  2546. This macro returns a nonzero value if X is subnormal. It is from
  2547. TS 18661-1:2014.
  2548. -- Macro: int iszero (_float-type_ X)
  2549. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2550. Concepts::.
  2551. This macro returns a nonzero value if X is zero. It is from TS
  2552. 18661-1:2014.
  2553. Another set of floating-point classification functions was provided
  2554. by BSD. The GNU C Library also supports these functions; however, we
  2555. recommend that you use the ISO C99 macros in new code. Those are
  2556. standard and will be available more widely. Also, since they are
  2557. macros, you do not have to worry about the type of their argument.
  2558. -- Function: int isinf (double X)
  2559. -- Function: int isinff (float X)
  2560. -- Function: int isinfl (long double X)
  2561. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2562. Concepts::.
  2563. This function returns ‘-1’ if X represents negative infinity, ‘1’
  2564. if X represents positive infinity, and ‘0’ otherwise.
  2565. -- Function: int isnan (double X)
  2566. -- Function: int isnanf (float X)
  2567. -- Function: int isnanl (long double X)
  2568. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2569. Concepts::.
  2570. This function returns a nonzero value if X is a “not a number”
  2571. value, and zero otherwise.
  2572. *NB:* The ‘isnan’ macro defined by ISO C99 overrides the BSD
  2573. function. This is normally not a problem, because the two routines
  2574. behave identically. However, if you really need to get the BSD
  2575. function for some reason, you can write
  2576. (isnan) (x)
  2577. -- Function: int finite (double X)
  2578. -- Function: int finitef (float X)
  2579. -- Function: int finitel (long double X)
  2580. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2581. Concepts::.
  2582. This function returns a nonzero value if X is finite or a “not a
  2583. number” value, and zero otherwise.
  2584. *Portability Note:* The functions listed in this section are BSD
  2585. extensions.
  2586. 
  2587. File: libc.info, Node: Floating Point Errors, Next: Rounding, Prev: Floating Point Classes, Up: Arithmetic
  2588. 20.5 Errors in Floating-Point Calculations
  2589. ==========================================
  2590. * Menu:
  2591. * FP Exceptions:: IEEE 754 math exceptions and how to detect them.
  2592. * Infinity and NaN:: Special values returned by calculations.
  2593. * Status bit operations:: Checking for exceptions after the fact.
  2594. * Math Error Reporting:: How the math functions report errors.
  2595. 
  2596. File: libc.info, Node: FP Exceptions, Next: Infinity and NaN, Up: Floating Point Errors
  2597. 20.5.1 FP Exceptions
  2598. --------------------
  2599. The IEEE 754 standard defines five "exceptions" that can occur during a
  2600. calculation. Each corresponds to a particular sort of error, such as
  2601. overflow.
  2602. When exceptions occur (when exceptions are "raised", in the language
  2603. of the standard), one of two things can happen. By default the
  2604. exception is simply noted in the floating-point "status word", and the
  2605. program continues as if nothing had happened. The operation produces a
  2606. default value, which depends on the exception (see the table below).
  2607. Your program can check the status word to find out which exceptions
  2608. happened.
  2609. Alternatively, you can enable "traps" for exceptions. In that case,
  2610. when an exception is raised, your program will receive the ‘SIGFPE’
  2611. signal. The default action for this signal is to terminate the program.
  2612. *Note Signal Handling::, for how you can change the effect of the
  2613. signal.
  2614. In the System V math library, the user-defined function ‘matherr’ is
  2615. called when certain exceptions occur inside math library functions.
  2616. However, the Unix98 standard deprecates this interface. We support it
  2617. for historical compatibility, but recommend that you do not use it in
  2618. new programs. When this interface is used, exceptions may not be
  2619. raised.
  2620. The exceptions defined in IEEE 754 are:
  2621. ‘Invalid Operation’
  2622. This exception is raised if the given operands are invalid for the
  2623. operation to be performed. Examples are (see IEEE 754, section 7):
  2624. 1. Addition or subtraction: oo - oo. (But oo + oo = oo).
  2625. 2. Multiplication: 0 * oo.
  2626. 3. Division: 0/0 or oo/oo.
  2627. 4. Remainder: x REM y, where y is zero or x is infinite.
  2628. 5. Square root if the operand is less than zero. More generally,
  2629. any mathematical function evaluated outside its domain
  2630. produces this exception.
  2631. 6. Conversion of a floating-point number to an integer or decimal
  2632. string, when the number cannot be represented in the target
  2633. format (due to overflow, infinity, or NaN).
  2634. 7. Conversion of an unrecognizable input string.
  2635. 8. Comparison via predicates involving < or >, when one or other
  2636. of the operands is NaN. You can prevent this exception by
  2637. using the unordered comparison functions instead; see *note FP
  2638. Comparison Functions::.
  2639. If the exception does not trap, the result of the operation is NaN.
  2640. ‘Division by Zero’
  2641. This exception is raised when a finite nonzero number is divided by
  2642. zero. If no trap occurs the result is either +oo or -oo, depending
  2643. on the signs of the operands.
  2644. ‘Overflow’
  2645. This exception is raised whenever the result cannot be represented
  2646. as a finite value in the precision format of the destination. If
  2647. no trap occurs the result depends on the sign of the intermediate
  2648. result and the current rounding mode (IEEE 754, section 7.3):
  2649. 1. Round to nearest carries all overflows to oo with the sign of
  2650. the intermediate result.
  2651. 2. Round toward 0 carries all overflows to the largest
  2652. representable finite number with the sign of the intermediate
  2653. result.
  2654. 3. Round toward -oo carries positive overflows to the largest
  2655. representable finite number and negative overflows to -oo.
  2656. 4. Round toward oo carries negative overflows to the most
  2657. negative representable finite number and positive overflows to
  2658. oo.
  2659. Whenever the overflow exception is raised, the inexact exception is
  2660. also raised.
  2661. ‘Underflow’
  2662. The underflow exception is raised when an intermediate result is
  2663. too small to be calculated accurately, or if the operation’s result
  2664. rounded to the destination precision is too small to be normalized.
  2665. When no trap is installed for the underflow exception, underflow is
  2666. signaled (via the underflow flag) only when both tininess and loss
  2667. of accuracy have been detected. If no trap handler is installed
  2668. the operation continues with an imprecise small value, or zero if
  2669. the destination precision cannot hold the small exact result.
  2670. ‘Inexact’
  2671. This exception is signalled if a rounded result is not exact (such
  2672. as when calculating the square root of two) or a result overflows
  2673. without an overflow trap.
  2674. 
  2675. File: libc.info, Node: Infinity and NaN, Next: Status bit operations, Prev: FP Exceptions, Up: Floating Point Errors
  2676. 20.5.2 Infinity and NaN
  2677. -----------------------
  2678. IEEE 754 floating point numbers can represent positive or negative
  2679. infinity, and "NaN" (not a number). These three values arise from
  2680. calculations whose result is undefined or cannot be represented
  2681. accurately. You can also deliberately set a floating-point variable to
  2682. any of them, which is sometimes useful. Some examples of calculations
  2683. that produce infinity or NaN:
  2684. 1/0 = oo
  2685. log (0) = -oo
  2686. sqrt (-1) = NaN
  2687. When a calculation produces any of these values, an exception also
  2688. occurs; see *note FP Exceptions::.
  2689. The basic operations and math functions all accept infinity and NaN
  2690. and produce sensible output. Infinities propagate through calculations
  2691. as one would expect: for example, 2 + oo = oo, 4/oo = 0, atan (oo) =
  2692. pi/2. NaN, on the other hand, infects any calculation that involves it.
  2693. Unless the calculation would produce the same result no matter what real
  2694. value replaced NaN, the result is NaN.
  2695. In comparison operations, positive infinity is larger than all values
  2696. except itself and NaN, and negative infinity is smaller than all values
  2697. except itself and NaN. NaN is "unordered": it is not equal to, greater
  2698. than, or less than anything, _including itself_. ‘x == x’ is false if
  2699. the value of ‘x’ is NaN. You can use this to test whether a value is NaN
  2700. or not, but the recommended way to test for NaN is with the ‘isnan’
  2701. function (*note Floating Point Classes::). In addition, ‘<’, ‘>’, ‘<=’,
  2702. and ‘>=’ will raise an exception when applied to NaNs.
  2703. ‘math.h’ defines macros that allow you to explicitly set a variable
  2704. to infinity or NaN.
  2705. -- Macro: float INFINITY
  2706. An expression representing positive infinity. It is equal to the
  2707. value produced by mathematical operations like ‘1.0 / 0.0’.
  2708. ‘-INFINITY’ represents negative infinity.
  2709. You can test whether a floating-point value is infinite by
  2710. comparing it to this macro. However, this is not recommended; you
  2711. should use the ‘isfinite’ macro instead. *Note Floating Point
  2712. Classes::.
  2713. This macro was introduced in the ISO C99 standard.
  2714. -- Macro: float NAN
  2715. An expression representing a value which is “not a number”. This
  2716. macro is a GNU extension, available only on machines that support
  2717. the “not a number” value—that is to say, on all machines that
  2718. support IEEE floating point.
  2719. You can use ‘#ifdef NAN’ to test whether the machine supports NaN.
  2720. (Of course, you must arrange for GNU extensions to be visible, such
  2721. as by defining ‘_GNU_SOURCE’, and then you must include ‘math.h’.)
  2722. -- Macro: float SNANF
  2723. -- Macro: double SNAN
  2724. -- Macro: long double SNANL
  2725. These macros, defined by TS 18661-1:2014, are constant expressions
  2726. for signaling NaNs.
  2727. -- Macro: int FE_SNANS_ALWAYS_SIGNAL
  2728. This macro, defined by TS 18661-1:2014, is defined to ‘1’ in
  2729. ‘fenv.h’ to indicate that functions and operations with signaling
  2730. NaN inputs and floating-point results always raise the invalid
  2731. exception and return a quiet NaN, even in cases (such as ‘fmax’,
  2732. ‘hypot’ and ‘pow’) where a quiet NaN input can produce a non-NaN
  2733. result. Because some compiler optimizations may not handle
  2734. signaling NaNs correctly, this macro is only defined if compiler
  2735. support for signaling NaNs is enabled. That support can be enabled
  2736. with the GCC option ‘-fsignaling-nans’.
  2737. IEEE 754 also allows for another unusual value: negative zero. This
  2738. value is produced when you divide a positive number by negative
  2739. infinity, or when a negative result is smaller than the limits of
  2740. representation.
  2741. 
  2742. File: libc.info, Node: Status bit operations, Next: Math Error Reporting, Prev: Infinity and NaN, Up: Floating Point Errors
  2743. 20.5.3 Examining the FPU status word
  2744. ------------------------------------
  2745. ISO C99 defines functions to query and manipulate the floating-point
  2746. status word. You can use these functions to check for untrapped
  2747. exceptions when it’s convenient, rather than worrying about them in the
  2748. middle of a calculation.
  2749. These constants represent the various IEEE 754 exceptions. Not all
  2750. FPUs report all the different exceptions. Each constant is defined if
  2751. and only if the FPU you are compiling for supports that exception, so
  2752. you can test for FPU support with ‘#ifdef’. They are defined in
  2753. ‘fenv.h’.
  2754. ‘FE_INEXACT’
  2755. The inexact exception.
  2756. ‘FE_DIVBYZERO’
  2757. The divide by zero exception.
  2758. ‘FE_UNDERFLOW’
  2759. The underflow exception.
  2760. ‘FE_OVERFLOW’
  2761. The overflow exception.
  2762. ‘FE_INVALID’
  2763. The invalid exception.
  2764. The macro ‘FE_ALL_EXCEPT’ is the bitwise OR of all exception macros
  2765. which are supported by the FP implementation.
  2766. These functions allow you to clear exception flags, test for
  2767. exceptions, and save and restore the set of exceptions flagged.
  2768. -- Function: int feclearexcept (int EXCEPTS)
  2769. Preliminary: | MT-Safe | AS-Safe !posix | AC-Safe !posix | *Note
  2770. POSIX Safety Concepts::.
  2771. This function clears all of the supported exception flags indicated
  2772. by EXCEPTS.
  2773. The function returns zero in case the operation was successful, a
  2774. non-zero value otherwise.
  2775. -- Function: int feraiseexcept (int EXCEPTS)
  2776. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2777. Concepts::.
  2778. This function raises the supported exceptions indicated by EXCEPTS.
  2779. If more than one exception bit in EXCEPTS is set the order in which
  2780. the exceptions are raised is undefined except that overflow
  2781. (‘FE_OVERFLOW’) or underflow (‘FE_UNDERFLOW’) are raised before
  2782. inexact (‘FE_INEXACT’). Whether for overflow or underflow the
  2783. inexact exception is also raised is also implementation dependent.
  2784. The function returns zero in case the operation was successful, a
  2785. non-zero value otherwise.
  2786. -- Function: int fesetexcept (int EXCEPTS)
  2787. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2788. Concepts::.
  2789. This function sets the supported exception flags indicated by
  2790. EXCEPTS, like ‘feraiseexcept’, but without causing enabled traps to
  2791. be taken. ‘fesetexcept’ is from TS 18661-1:2014.
  2792. The function returns zero in case the operation was successful, a
  2793. non-zero value otherwise.
  2794. -- Function: int fetestexcept (int EXCEPTS)
  2795. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2796. Concepts::.
  2797. Test whether the exception flags indicated by the parameter EXCEPT
  2798. are currently set. If any of them are, a nonzero value is returned
  2799. which specifies which exceptions are set. Otherwise the result is
  2800. zero.
  2801. To understand these functions, imagine that the status word is an
  2802. integer variable named STATUS. ‘feclearexcept’ is then equivalent to
  2803. ‘status &= ~excepts’ and ‘fetestexcept’ is equivalent to ‘(status &
  2804. excepts)’. The actual implementation may be very different, of course.
  2805. Exception flags are only cleared when the program explicitly requests
  2806. it, by calling ‘feclearexcept’. If you want to check for exceptions
  2807. from a set of calculations, you should clear all the flags first. Here
  2808. is a simple example of the way to use ‘fetestexcept’:
  2809. {
  2810. double f;
  2811. int raised;
  2812. feclearexcept (FE_ALL_EXCEPT);
  2813. f = compute ();
  2814. raised = fetestexcept (FE_OVERFLOW | FE_INVALID);
  2815. if (raised & FE_OVERFLOW) { /* … */ }
  2816. if (raised & FE_INVALID) { /* … */ }
  2817. /* … */
  2818. }
  2819. You cannot explicitly set bits in the status word. You can, however,
  2820. save the entire status word and restore it later. This is done with the
  2821. following functions:
  2822. -- Function: int fegetexceptflag (fexcept_t *FLAGP, int EXCEPTS)
  2823. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2824. Concepts::.
  2825. This function stores in the variable pointed to by FLAGP an
  2826. implementation-defined value representing the current setting of
  2827. the exception flags indicated by EXCEPTS.
  2828. The function returns zero in case the operation was successful, a
  2829. non-zero value otherwise.
  2830. -- Function: int fesetexceptflag (const fexcept_t *FLAGP, int EXCEPTS)
  2831. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2832. Concepts::.
  2833. This function restores the flags for the exceptions indicated by
  2834. EXCEPTS to the values stored in the variable pointed to by FLAGP.
  2835. The function returns zero in case the operation was successful, a
  2836. non-zero value otherwise.
  2837. Note that the value stored in ‘fexcept_t’ bears no resemblance to the
  2838. bit mask returned by ‘fetestexcept’. The type may not even be an
  2839. integer. Do not attempt to modify an ‘fexcept_t’ variable.
  2840. -- Function: int fetestexceptflag (const fexcept_t *FLAGP, int EXCEPTS)
  2841. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2842. Concepts::.
  2843. Test whether the exception flags indicated by the parameter EXCEPTS
  2844. are set in the variable pointed to by FLAGP. If any of them are, a
  2845. nonzero value is returned which specifies which exceptions are set.
  2846. Otherwise the result is zero. ‘fetestexceptflag’ is from TS
  2847. 18661-1:2014.
  2848. 
  2849. File: libc.info, Node: Math Error Reporting, Prev: Status bit operations, Up: Floating Point Errors
  2850. 20.5.4 Error Reporting by Mathematical Functions
  2851. ------------------------------------------------
  2852. Many of the math functions are defined only over a subset of the real or
  2853. complex numbers. Even if they are mathematically defined, their result
  2854. may be larger or smaller than the range representable by their return
  2855. type without loss of accuracy. These are known as "domain errors",
  2856. "overflows", and "underflows", respectively. Math functions do several
  2857. things when one of these errors occurs. In this manual we will refer to
  2858. the complete response as "signalling" a domain error, overflow, or
  2859. underflow.
  2860. When a math function suffers a domain error, it raises the invalid
  2861. exception and returns NaN. It also sets ERRNO to ‘EDOM’; this is for
  2862. compatibility with old systems that do not support IEEE 754 exception
  2863. handling. Likewise, when overflow occurs, math functions raise the
  2864. overflow exception and, in the default rounding mode, return oo or -oo
  2865. as appropriate (in other rounding modes, the largest finite value of the
  2866. appropriate sign is returned when appropriate for that rounding mode).
  2867. They also set ERRNO to ‘ERANGE’ if returning oo or -oo; ERRNO may or may
  2868. not be set to ‘ERANGE’ when a finite value is returned on overflow.
  2869. When underflow occurs, the underflow exception is raised, and zero
  2870. (appropriately signed) or a subnormal value, as appropriate for the
  2871. mathematical result of the function and the rounding mode, is returned.
  2872. ERRNO may be set to ‘ERANGE’, but this is not guaranteed; it is intended
  2873. that the GNU C Library should set it when the underflow is to an
  2874. appropriately signed zero, but not necessarily for other underflows.
  2875. When a math function has an argument that is a signaling NaN, the GNU
  2876. C Library does not consider this a domain error, so ‘errno’ is
  2877. unchanged, but the invalid exception is still raised (except for a few
  2878. functions that are specified to handle signaling NaNs differently).
  2879. Some of the math functions are defined mathematically to result in a
  2880. complex value over parts of their domains. The most familiar example of
  2881. this is taking the square root of a negative number. The complex math
  2882. functions, such as ‘csqrt’, will return the appropriate complex value in
  2883. this case. The real-valued functions, such as ‘sqrt’, will signal a
  2884. domain error.
  2885. Some older hardware does not support infinities. On that hardware,
  2886. overflows instead return a particular very large number (usually the
  2887. largest representable number). ‘math.h’ defines macros you can use to
  2888. test for overflow on both old and new hardware.
  2889. -- Macro: double HUGE_VAL
  2890. -- Macro: float HUGE_VALF
  2891. -- Macro: long double HUGE_VALL
  2892. An expression representing a particular very large number. On
  2893. machines that use IEEE 754 floating point format, ‘HUGE_VAL’ is
  2894. infinity. On other machines, it’s typically the largest positive
  2895. number that can be represented.
  2896. Mathematical functions return the appropriately typed version of
  2897. ‘HUGE_VAL’ or ‘−HUGE_VAL’ when the result is too large to be
  2898. represented.
  2899. 
  2900. File: libc.info, Node: Rounding, Next: Control Functions, Prev: Floating Point Errors, Up: Arithmetic
  2901. 20.6 Rounding Modes
  2902. ===================
  2903. Floating-point calculations are carried out internally with extra
  2904. precision, and then rounded to fit into the destination type. This
  2905. ensures that results are as precise as the input data. IEEE 754 defines
  2906. four possible rounding modes:
  2907. Round to nearest.
  2908. This is the default mode. It should be used unless there is a
  2909. specific need for one of the others. In this mode results are
  2910. rounded to the nearest representable value. If the result is
  2911. midway between two representable values, the even representable is
  2912. chosen. "Even" here means the lowest-order bit is zero. This
  2913. rounding mode prevents statistical bias and guarantees numeric
  2914. stability: round-off errors in a lengthy calculation will remain
  2915. smaller than half of ‘FLT_EPSILON’.
  2916. Round toward plus Infinity.
  2917. All results are rounded to the smallest representable value which
  2918. is greater than the result.
  2919. Round toward minus Infinity.
  2920. All results are rounded to the largest representable value which is
  2921. less than the result.
  2922. Round toward zero.
  2923. All results are rounded to the largest representable value whose
  2924. magnitude is less than that of the result. In other words, if the
  2925. result is negative it is rounded up; if it is positive, it is
  2926. rounded down.
  2927. ‘fenv.h’ defines constants which you can use to refer to the various
  2928. rounding modes. Each one will be defined if and only if the FPU
  2929. supports the corresponding rounding mode.
  2930. ‘FE_TONEAREST’
  2931. Round to nearest.
  2932. ‘FE_UPWARD’
  2933. Round toward +oo.
  2934. ‘FE_DOWNWARD’
  2935. Round toward -oo.
  2936. ‘FE_TOWARDZERO’
  2937. Round toward zero.
  2938. Underflow is an unusual case. Normally, IEEE 754 floating point
  2939. numbers are always normalized (*note Floating Point Concepts::).
  2940. Numbers smaller than 2^r (where r is the minimum exponent,
  2941. ‘FLT_MIN_RADIX-1’ for FLOAT) cannot be represented as normalized
  2942. numbers. Rounding all such numbers to zero or 2^r would cause some
  2943. algorithms to fail at 0. Therefore, they are left in denormalized form.
  2944. That produces loss of precision, since some bits of the mantissa are
  2945. stolen to indicate the decimal point.
  2946. If a result is too small to be represented as a denormalized number,
  2947. it is rounded to zero. However, the sign of the result is preserved; if
  2948. the calculation was negative, the result is "negative zero". Negative
  2949. zero can also result from some operations on infinity, such as 4/-oo.
  2950. At any time, one of the above four rounding modes is selected. You
  2951. can find out which one with this function:
  2952. -- Function: int fegetround (void)
  2953. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2954. Concepts::.
  2955. Returns the currently selected rounding mode, represented by one of
  2956. the values of the defined rounding mode macros.
  2957. To change the rounding mode, use this function:
  2958. -- Function: int fesetround (int ROUND)
  2959. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2960. Concepts::.
  2961. Changes the currently selected rounding mode to ROUND. If ROUND
  2962. does not correspond to one of the supported rounding modes nothing
  2963. is changed. ‘fesetround’ returns zero if it changed the rounding
  2964. mode, or a nonzero value if the mode is not supported.
  2965. You should avoid changing the rounding mode if possible. It can be
  2966. an expensive operation; also, some hardware requires you to compile your
  2967. program differently for it to work. The resulting code may run slower.
  2968. See your compiler documentation for details.
  2969. 
  2970. File: libc.info, Node: Control Functions, Next: Arithmetic Functions, Prev: Rounding, Up: Arithmetic
  2971. 20.7 Floating-Point Control Functions
  2972. =====================================
  2973. IEEE 754 floating-point implementations allow the programmer to decide
  2974. whether traps will occur for each of the exceptions, by setting bits in
  2975. the "control word". In C, traps result in the program receiving the
  2976. ‘SIGFPE’ signal; see *note Signal Handling::.
  2977. *NB:* IEEE 754 says that trap handlers are given details of the
  2978. exceptional situation, and can set the result value. C signals do not
  2979. provide any mechanism to pass this information back and forth. Trapping
  2980. exceptions in C is therefore not very useful.
  2981. It is sometimes necessary to save the state of the floating-point
  2982. unit while you perform some calculation. The library provides functions
  2983. which save and restore the exception flags, the set of exceptions that
  2984. generate traps, and the rounding mode. This information is known as the
  2985. "floating-point environment".
  2986. The functions to save and restore the floating-point environment all
  2987. use a variable of type ‘fenv_t’ to store information. This type is
  2988. defined in ‘fenv.h’. Its size and contents are implementation-defined.
  2989. You should not attempt to manipulate a variable of this type directly.
  2990. To save the state of the FPU, use one of these functions:
  2991. -- Function: int fegetenv (fenv_t *ENVP)
  2992. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  2993. Concepts::.
  2994. Store the floating-point environment in the variable pointed to by
  2995. ENVP.
  2996. The function returns zero in case the operation was successful, a
  2997. non-zero value otherwise.
  2998. -- Function: int feholdexcept (fenv_t *ENVP)
  2999. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3000. Concepts::.
  3001. Store the current floating-point environment in the object pointed
  3002. to by ENVP. Then clear all exception flags, and set the FPU to
  3003. trap no exceptions. Not all FPUs support trapping no exceptions;
  3004. if ‘feholdexcept’ cannot set this mode, it returns nonzero value.
  3005. If it succeeds, it returns zero.
  3006. The functions which restore the floating-point environment can take
  3007. these kinds of arguments:
  3008. • Pointers to ‘fenv_t’ objects, which were initialized previously by
  3009. a call to ‘fegetenv’ or ‘feholdexcept’.
  3010. • The special macro ‘FE_DFL_ENV’ which represents the floating-point
  3011. environment as it was available at program start.
  3012. • Implementation defined macros with names starting with ‘FE_’ and
  3013. having type ‘fenv_t *’.
  3014. If possible, the GNU C Library defines a macro ‘FE_NOMASK_ENV’
  3015. which represents an environment where every exception raised causes
  3016. a trap to occur. You can test for this macro using ‘#ifdef’. It
  3017. is only defined if ‘_GNU_SOURCE’ is defined.
  3018. Some platforms might define other predefined environments.
  3019. To set the floating-point environment, you can use either of these
  3020. functions:
  3021. -- Function: int fesetenv (const fenv_t *ENVP)
  3022. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3023. Concepts::.
  3024. Set the floating-point environment to that described by ENVP.
  3025. The function returns zero in case the operation was successful, a
  3026. non-zero value otherwise.
  3027. -- Function: int feupdateenv (const fenv_t *ENVP)
  3028. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3029. Concepts::.
  3030. Like ‘fesetenv’, this function sets the floating-point environment
  3031. to that described by ENVP. However, if any exceptions were flagged
  3032. in the status word before ‘feupdateenv’ was called, they remain
  3033. flagged after the call. In other words, after ‘feupdateenv’ is
  3034. called, the status word is the bitwise OR of the previous status
  3035. word and the one saved in ENVP.
  3036. The function returns zero in case the operation was successful, a
  3037. non-zero value otherwise.
  3038. TS 18661-1:2014 defines additional functions to save and restore
  3039. floating-point control modes (such as the rounding mode and whether
  3040. traps are enabled) while leaving other status (such as raised flags)
  3041. unchanged.
  3042. The special macro ‘FE_DFL_MODE’ may be passed to ‘fesetmode’. It
  3043. represents the floating-point control modes at program start.
  3044. -- Function: int fegetmode (femode_t *MODEP)
  3045. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3046. Concepts::.
  3047. Store the floating-point control modes in the variable pointed to
  3048. by MODEP.
  3049. The function returns zero in case the operation was successful, a
  3050. non-zero value otherwise.
  3051. -- Function: int fesetmode (const femode_t *MODEP)
  3052. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3053. Concepts::.
  3054. Set the floating-point control modes to those described by MODEP.
  3055. The function returns zero in case the operation was successful, a
  3056. non-zero value otherwise.
  3057. To control for individual exceptions if raising them causes a trap to
  3058. occur, you can use the following two functions.
  3059. *Portability Note:* These functions are all GNU extensions.
  3060. -- Function: int feenableexcept (int EXCEPTS)
  3061. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3062. Concepts::.
  3063. This function enables traps for each of the exceptions as indicated
  3064. by the parameter EXCEPTS. The individual exceptions are described
  3065. in *note Status bit operations::. Only the specified exceptions
  3066. are enabled, the status of the other exceptions is not changed.
  3067. The function returns the previous enabled exceptions in case the
  3068. operation was successful, ‘-1’ otherwise.
  3069. -- Function: int fedisableexcept (int EXCEPTS)
  3070. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3071. Concepts::.
  3072. This function disables traps for each of the exceptions as
  3073. indicated by the parameter EXCEPTS. The individual exceptions are
  3074. described in *note Status bit operations::. Only the specified
  3075. exceptions are disabled, the status of the other exceptions is not
  3076. changed.
  3077. The function returns the previous enabled exceptions in case the
  3078. operation was successful, ‘-1’ otherwise.
  3079. -- Function: int fegetexcept (void)
  3080. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3081. Concepts::.
  3082. The function returns a bitmask of all currently enabled exceptions.
  3083. It returns ‘-1’ in case of failure.
  3084. 
  3085. File: libc.info, Node: Arithmetic Functions, Next: Complex Numbers, Prev: Control Functions, Up: Arithmetic
  3086. 20.8 Arithmetic Functions
  3087. =========================
  3088. The C library provides functions to do basic operations on
  3089. floating-point numbers. These include absolute value, maximum and
  3090. minimum, normalization, bit twiddling, rounding, and a few others.
  3091. * Menu:
  3092. * Absolute Value:: Absolute values of integers and floats.
  3093. * Normalization Functions:: Extracting exponents and putting them back.
  3094. * Rounding Functions:: Rounding floats to integers.
  3095. * Remainder Functions:: Remainders on division, precisely defined.
  3096. * FP Bit Twiddling:: Sign bit adjustment. Adding epsilon.
  3097. * FP Comparison Functions:: Comparisons without risk of exceptions.
  3098. * Misc FP Arithmetic:: Max, min, positive difference, multiply-add.
  3099. 
  3100. File: libc.info, Node: Absolute Value, Next: Normalization Functions, Up: Arithmetic Functions
  3101. 20.8.1 Absolute Value
  3102. ---------------------
  3103. These functions are provided for obtaining the "absolute value" (or
  3104. "magnitude") of a number. The absolute value of a real number X is X if
  3105. X is positive, −X if X is negative. For a complex number Z, whose real
  3106. part is X and whose imaginary part is Y, the absolute value is
  3107. ‘sqrt (X*X + Y*Y)’.
  3108. Prototypes for ‘abs’, ‘labs’ and ‘llabs’ are in ‘stdlib.h’; ‘imaxabs’
  3109. is declared in ‘inttypes.h’; ‘fabs’, ‘fabsf’ and ‘fabsl’ are declared in
  3110. ‘math.h’. ‘cabs’, ‘cabsf’ and ‘cabsl’ are declared in ‘complex.h’.
  3111. -- Function: int abs (int NUMBER)
  3112. -- Function: long int labs (long int NUMBER)
  3113. -- Function: long long int llabs (long long int NUMBER)
  3114. -- Function: intmax_t imaxabs (intmax_t NUMBER)
  3115. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3116. Concepts::.
  3117. These functions return the absolute value of NUMBER.
  3118. Most computers use a two’s complement integer representation, in
  3119. which the absolute value of ‘INT_MIN’ (the smallest possible ‘int’)
  3120. cannot be represented; thus, ‘abs (INT_MIN)’ is not defined.
  3121. ‘llabs’ and ‘imaxdiv’ are new to ISO C99.
  3122. See *note Integers:: for a description of the ‘intmax_t’ type.
  3123. -- Function: double fabs (double NUMBER)
  3124. -- Function: float fabsf (float NUMBER)
  3125. -- Function: long double fabsl (long double NUMBER)
  3126. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3127. Concepts::.
  3128. This function returns the absolute value of the floating-point
  3129. number NUMBER.
  3130. -- Function: double cabs (complex double Z)
  3131. -- Function: float cabsf (complex float Z)
  3132. -- Function: long double cabsl (complex long double Z)
  3133. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3134. Concepts::.
  3135. These functions return the absolute value of the complex number Z
  3136. (*note Complex Numbers::). The absolute value of a complex number
  3137. is:
  3138. sqrt (creal (Z) * creal (Z) + cimag (Z) * cimag (Z))
  3139. This function should always be used instead of the direct formula
  3140. because it takes special care to avoid losing precision. It may
  3141. also take advantage of hardware support for this operation. See
  3142. ‘hypot’ in *note Exponents and Logarithms::.
  3143. 
  3144. File: libc.info, Node: Normalization Functions, Next: Rounding Functions, Prev: Absolute Value, Up: Arithmetic Functions
  3145. 20.8.2 Normalization Functions
  3146. ------------------------------
  3147. The functions described in this section are primarily provided as a way
  3148. to efficiently perform certain low-level manipulations on floating point
  3149. numbers that are represented internally using a binary radix; see *note
  3150. Floating Point Concepts::. These functions are required to have
  3151. equivalent behavior even if the representation does not use a radix of
  3152. 2, but of course they are unlikely to be particularly efficient in those
  3153. cases.
  3154. All these functions are declared in ‘math.h’.
  3155. -- Function: double frexp (double VALUE, int *EXPONENT)
  3156. -- Function: float frexpf (float VALUE, int *EXPONENT)
  3157. -- Function: long double frexpl (long double VALUE, int *EXPONENT)
  3158. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3159. Concepts::.
  3160. These functions are used to split the number VALUE into a
  3161. normalized fraction and an exponent.
  3162. If the argument VALUE is not zero, the return value is VALUE times
  3163. a power of two, and its magnitude is always in the range 1/2
  3164. (inclusive) to 1 (exclusive). The corresponding exponent is stored
  3165. in ‘*EXPONENT’; the return value multiplied by 2 raised to this
  3166. exponent equals the original number VALUE.
  3167. For example, ‘frexp (12.8, &exponent)’ returns ‘0.8’ and stores ‘4’
  3168. in ‘exponent’.
  3169. If VALUE is zero, then the return value is zero and zero is stored
  3170. in ‘*EXPONENT’.
  3171. -- Function: double ldexp (double VALUE, int EXPONENT)
  3172. -- Function: float ldexpf (float VALUE, int EXPONENT)
  3173. -- Function: long double ldexpl (long double VALUE, int EXPONENT)
  3174. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3175. Concepts::.
  3176. These functions return the result of multiplying the floating-point
  3177. number VALUE by 2 raised to the power EXPONENT. (It can be used to
  3178. reassemble floating-point numbers that were taken apart by
  3179. ‘frexp’.)
  3180. For example, ‘ldexp (0.8, 4)’ returns ‘12.8’.
  3181. The following functions, which come from BSD, provide facilities
  3182. equivalent to those of ‘ldexp’ and ‘frexp’. See also the ISO C function
  3183. ‘logb’ which originally also appeared in BSD.
  3184. -- Function: double scalb (double VALUE, double EXPONENT)
  3185. -- Function: float scalbf (float VALUE, float EXPONENT)
  3186. -- Function: long double scalbl (long double VALUE, long double
  3187. EXPONENT)
  3188. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3189. Concepts::.
  3190. The ‘scalb’ function is the BSD name for ‘ldexp’.
  3191. -- Function: double scalbn (double X, int N)
  3192. -- Function: float scalbnf (float X, int N)
  3193. -- Function: long double scalbnl (long double X, int N)
  3194. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3195. Concepts::.
  3196. ‘scalbn’ is identical to ‘scalb’, except that the exponent N is an
  3197. ‘int’ instead of a floating-point number.
  3198. -- Function: double scalbln (double X, long int N)
  3199. -- Function: float scalblnf (float X, long int N)
  3200. -- Function: long double scalblnl (long double X, long int N)
  3201. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3202. Concepts::.
  3203. ‘scalbln’ is identical to ‘scalb’, except that the exponent N is a
  3204. ‘long int’ instead of a floating-point number.
  3205. -- Function: double significand (double X)
  3206. -- Function: float significandf (float X)
  3207. -- Function: long double significandl (long double X)
  3208. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3209. Concepts::.
  3210. ‘significand’ returns the mantissa of X scaled to the range [1, 2).
  3211. It is equivalent to ‘scalb (X, (double) -ilogb (X))’.
  3212. This function exists mainly for use in certain standardized tests
  3213. of IEEE 754 conformance.
  3214. 
  3215. File: libc.info, Node: Rounding Functions, Next: Remainder Functions, Prev: Normalization Functions, Up: Arithmetic Functions
  3216. 20.8.3 Rounding Functions
  3217. -------------------------
  3218. The functions listed here perform operations such as rounding and
  3219. truncation of floating-point values. Some of these functions convert
  3220. floating point numbers to integer values. They are all declared in
  3221. ‘math.h’.
  3222. You can also convert floating-point numbers to integers simply by
  3223. casting them to ‘int’. This discards the fractional part, effectively
  3224. rounding towards zero. However, this only works if the result can
  3225. actually be represented as an ‘int’—for very large numbers, this is
  3226. impossible. The functions listed here return the result as a ‘double’
  3227. instead to get around this problem.
  3228. The ‘fromfp’ functions use the following macros, from TS
  3229. 18661-1:2014, to specify the direction of rounding. These correspond to
  3230. the rounding directions defined in IEEE 754-2008.
  3231. ‘FP_INT_UPWARD’
  3232. Round toward +oo.
  3233. ‘FP_INT_DOWNWARD’
  3234. Round toward -oo.
  3235. ‘FP_INT_TOWARDZERO’
  3236. Round toward zero.
  3237. ‘FP_INT_TONEARESTFROMZERO’
  3238. Round to nearest, ties round away from zero.
  3239. ‘FP_INT_TONEAREST’
  3240. Round to nearest, ties round to even.
  3241. -- Function: double ceil (double X)
  3242. -- Function: float ceilf (float X)
  3243. -- Function: long double ceill (long double X)
  3244. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3245. Concepts::.
  3246. These functions round X upwards to the nearest integer, returning
  3247. that value as a ‘double’. Thus, ‘ceil (1.5)’ is ‘2.0’.
  3248. -- Function: double floor (double X)
  3249. -- Function: float floorf (float X)
  3250. -- Function: long double floorl (long double X)
  3251. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3252. Concepts::.
  3253. These functions round X downwards to the nearest integer, returning
  3254. that value as a ‘double’. Thus, ‘floor (1.5)’ is ‘1.0’ and ‘floor
  3255. (-1.5)’ is ‘-2.0’.
  3256. -- Function: double trunc (double X)
  3257. -- Function: float truncf (float X)
  3258. -- Function: long double truncl (long double X)
  3259. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3260. Concepts::.
  3261. The ‘trunc’ functions round X towards zero to the nearest integer
  3262. (returned in floating-point format). Thus, ‘trunc (1.5)’ is ‘1.0’
  3263. and ‘trunc (-1.5)’ is ‘-1.0’.
  3264. -- Function: double rint (double X)
  3265. -- Function: float rintf (float X)
  3266. -- Function: long double rintl (long double X)
  3267. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3268. Concepts::.
  3269. These functions round X to an integer value according to the
  3270. current rounding mode. *Note Floating Point Parameters::, for
  3271. information about the various rounding modes. The default rounding
  3272. mode is to round to the nearest integer; some machines support
  3273. other modes, but round-to-nearest is always used unless you
  3274. explicitly select another.
  3275. If X was not initially an integer, these functions raise the
  3276. inexact exception.
  3277. -- Function: double nearbyint (double X)
  3278. -- Function: float nearbyintf (float X)
  3279. -- Function: long double nearbyintl (long double X)
  3280. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3281. Concepts::.
  3282. These functions return the same value as the ‘rint’ functions, but
  3283. do not raise the inexact exception if X is not an integer.
  3284. -- Function: double round (double X)
  3285. -- Function: float roundf (float X)
  3286. -- Function: long double roundl (long double X)
  3287. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3288. Concepts::.
  3289. These functions are similar to ‘rint’, but they round halfway cases
  3290. away from zero instead of to the nearest integer (or other current
  3291. rounding mode).
  3292. -- Function: double roundeven (double X)
  3293. -- Function: float roundevenf (float X)
  3294. -- Function: long double roundevenl (long double X)
  3295. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3296. Concepts::.
  3297. These functions, from TS 18661-1:2014, are similar to ‘round’, but
  3298. they round halfway cases to even instead of away from zero.
  3299. -- Function: long int lrint (double X)
  3300. -- Function: long int lrintf (float X)
  3301. -- Function: long int lrintl (long double X)
  3302. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3303. Concepts::.
  3304. These functions are just like ‘rint’, but they return a ‘long int’
  3305. instead of a floating-point number.
  3306. -- Function: long long int llrint (double X)
  3307. -- Function: long long int llrintf (float X)
  3308. -- Function: long long int llrintl (long double X)
  3309. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3310. Concepts::.
  3311. These functions are just like ‘rint’, but they return a ‘long long
  3312. int’ instead of a floating-point number.
  3313. -- Function: long int lround (double X)
  3314. -- Function: long int lroundf (float X)
  3315. -- Function: long int lroundl (long double X)
  3316. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3317. Concepts::.
  3318. These functions are just like ‘round’, but they return a ‘long int’
  3319. instead of a floating-point number.
  3320. -- Function: long long int llround (double X)
  3321. -- Function: long long int llroundf (float X)
  3322. -- Function: long long int llroundl (long double X)
  3323. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3324. Concepts::.
  3325. These functions are just like ‘round’, but they return a ‘long long
  3326. int’ instead of a floating-point number.
  3327. -- Function: intmax_t fromfp (double X, int ROUND, unsigned int WIDTH)
  3328. -- Function: intmax_t fromfpf (float X, int ROUND, unsigned int WIDTH)
  3329. -- Function: intmax_t fromfpl (long double X, int ROUND, unsigned int
  3330. WIDTH)
  3331. -- Function: uintmax_t ufromfp (double X, int ROUND, unsigned int
  3332. WIDTH)
  3333. -- Function: uintmax_t ufromfpf (float X, int ROUND, unsigned int
  3334. WIDTH)
  3335. -- Function: uintmax_t ufromfpl (long double X, int ROUND, unsigned int
  3336. WIDTH)
  3337. -- Function: intmax_t fromfpx (double X, int ROUND, unsigned int WIDTH)
  3338. -- Function: intmax_t fromfpxf (float X, int ROUND, unsigned int WIDTH)
  3339. -- Function: intmax_t fromfpxl (long double X, int ROUND, unsigned int
  3340. WIDTH)
  3341. -- Function: uintmax_t ufromfpx (double X, int ROUND, unsigned int
  3342. WIDTH)
  3343. -- Function: uintmax_t ufromfpxf (float X, int ROUND, unsigned int
  3344. WIDTH)
  3345. -- Function: uintmax_t ufromfpxl (long double X, int ROUND, unsigned
  3346. int WIDTH)
  3347. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3348. Concepts::.
  3349. These functions, from TS 18661-1:2014, convert a floating-point
  3350. number to an integer according to the rounding direction ROUND (one
  3351. of the ‘FP_INT_*’ macros). If the integer is outside the range of
  3352. a signed or unsigned (depending on the return type of the function)
  3353. type of width WIDTH bits (or outside the range of the return type,
  3354. if WIDTH is larger), or if X is infinite or NaN, or if WIDTH is
  3355. zero, a domain error occurs and an unspecified value is returned.
  3356. The functions with an ‘x’ in their names raise the inexact
  3357. exception when a domain error does not occur and the argument is
  3358. not an integer; the other functions do not raise the inexact
  3359. exception.
  3360. -- Function: double modf (double VALUE, double *INTEGER-PART)
  3361. -- Function: float modff (float VALUE, float *INTEGER-PART)
  3362. -- Function: long double modfl (long double VALUE, long double
  3363. *INTEGER-PART)
  3364. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3365. Concepts::.
  3366. These functions break the argument VALUE into an integer part and a
  3367. fractional part (between ‘-1’ and ‘1’, exclusive). Their sum
  3368. equals VALUE. Each of the parts has the same sign as VALUE, and
  3369. the integer part is always rounded toward zero.
  3370. ‘modf’ stores the integer part in ‘*INTEGER-PART’, and returns the
  3371. fractional part. For example, ‘modf (2.5, &intpart)’ returns ‘0.5’
  3372. and stores ‘2.0’ into ‘intpart’.
  3373. 
  3374. File: libc.info, Node: Remainder Functions, Next: FP Bit Twiddling, Prev: Rounding Functions, Up: Arithmetic Functions
  3375. 20.8.4 Remainder Functions
  3376. --------------------------
  3377. The functions in this section compute the remainder on division of two
  3378. floating-point numbers. Each is a little different; pick the one that
  3379. suits your problem.
  3380. -- Function: double fmod (double NUMERATOR, double DENOMINATOR)
  3381. -- Function: float fmodf (float NUMERATOR, float DENOMINATOR)
  3382. -- Function: long double fmodl (long double NUMERATOR, long double
  3383. DENOMINATOR)
  3384. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3385. Concepts::.
  3386. These functions compute the remainder from the division of
  3387. NUMERATOR by DENOMINATOR. Specifically, the return value is
  3388. ‘NUMERATOR - N * DENOMINATOR’, where N is the quotient of NUMERATOR
  3389. divided by DENOMINATOR, rounded towards zero to an integer. Thus, ‘fmod (6.5, 2.3)’
  3390. returns ‘1.9’, which is ‘6.5’ minus ‘4.6’.
  3391. The result has the same sign as the NUMERATOR and has magnitude
  3392. less than the magnitude of the DENOMINATOR.
  3393. If DENOMINATOR is zero, ‘fmod’ signals a domain error.
  3394. -- Function: double drem (double NUMERATOR, double DENOMINATOR)
  3395. -- Function: float dremf (float NUMERATOR, float DENOMINATOR)
  3396. -- Function: long double dreml (long double NUMERATOR, long double
  3397. DENOMINATOR)
  3398. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3399. Concepts::.
  3400. These functions are like ‘fmod’ except that they round the internal
  3401. quotient N to the nearest integer instead of towards zero to an
  3402. integer. For example, ‘drem (6.5, 2.3)’ returns ‘-0.4’, which is
  3403. ‘6.5’ minus ‘6.9’.
  3404. The absolute value of the result is less than or equal to half the
  3405. absolute value of the DENOMINATOR. The difference between ‘fmod
  3406. (NUMERATOR, DENOMINATOR)’ and ‘drem (NUMERATOR, DENOMINATOR)’ is
  3407. always either DENOMINATOR, minus DENOMINATOR, or zero.
  3408. If DENOMINATOR is zero, ‘drem’ signals a domain error.
  3409. -- Function: double remainder (double NUMERATOR, double DENOMINATOR)
  3410. -- Function: float remainderf (float NUMERATOR, float DENOMINATOR)
  3411. -- Function: long double remainderl (long double NUMERATOR, long double
  3412. DENOMINATOR)
  3413. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3414. Concepts::.
  3415. This function is another name for ‘drem’.
  3416. 
  3417. File: libc.info, Node: FP Bit Twiddling, Next: FP Comparison Functions, Prev: Remainder Functions, Up: Arithmetic Functions
  3418. 20.8.5 Setting and modifying single bits of FP values
  3419. -----------------------------------------------------
  3420. There are some operations that are too complicated or expensive to
  3421. perform by hand on floating-point numbers. ISO C99 defines functions to
  3422. do these operations, which mostly involve changing single bits.
  3423. -- Function: double copysign (double X, double Y)
  3424. -- Function: float copysignf (float X, float Y)
  3425. -- Function: long double copysignl (long double X, long double Y)
  3426. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3427. Concepts::.
  3428. These functions return X but with the sign of Y. They work even if
  3429. X or Y are NaN or zero. Both of these can carry a sign (although
  3430. not all implementations support it) and this is one of the few
  3431. operations that can tell the difference.
  3432. ‘copysign’ never raises an exception.
  3433. This function is defined in IEC 559 (and the appendix with
  3434. recommended functions in IEEE 754/IEEE 854).
  3435. -- Function: int signbit (_float-type_ X)
  3436. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3437. Concepts::.
  3438. ‘signbit’ is a generic macro which can work on all floating-point
  3439. types. It returns a nonzero value if the value of X has its sign
  3440. bit set.
  3441. This is not the same as ‘x < 0.0’, because IEEE 754 floating point
  3442. allows zero to be signed. The comparison ‘-0.0 < 0.0’ is false,
  3443. but ‘signbit (-0.0)’ will return a nonzero value.
  3444. -- Function: double nextafter (double X, double Y)
  3445. -- Function: float nextafterf (float X, float Y)
  3446. -- Function: long double nextafterl (long double X, long double Y)
  3447. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3448. Concepts::.
  3449. The ‘nextafter’ function returns the next representable neighbor of
  3450. X in the direction towards Y. The size of the step between X and
  3451. the result depends on the type of the result. If X = Y the
  3452. function simply returns Y. If either value is ‘NaN’, ‘NaN’ is
  3453. returned. Otherwise a value corresponding to the value of the
  3454. least significant bit in the mantissa is added or subtracted,
  3455. depending on the direction. ‘nextafter’ will signal overflow or
  3456. underflow if the result goes outside of the range of normalized
  3457. numbers.
  3458. This function is defined in IEC 559 (and the appendix with
  3459. recommended functions in IEEE 754/IEEE 854).
  3460. -- Function: double nexttoward (double X, long double Y)
  3461. -- Function: float nexttowardf (float X, long double Y)
  3462. -- Function: long double nexttowardl (long double X, long double Y)
  3463. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3464. Concepts::.
  3465. These functions are identical to the corresponding versions of
  3466. ‘nextafter’ except that their second argument is a ‘long double’.
  3467. -- Function: double nextup (double X)
  3468. -- Function: float nextupf (float X)
  3469. -- Function: long double nextupl (long double X)
  3470. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3471. Concepts::.
  3472. The ‘nextup’ function returns the next representable neighbor of X
  3473. in the direction of positive infinity. If X is the smallest
  3474. negative subnormal number in the type of X the function returns
  3475. ‘-0’. If X = ‘0’ the function returns the smallest positive
  3476. subnormal number in the type of X. If X is NaN, NaN is returned.
  3477. If X is +oo, +oo is returned. ‘nextup’ is from TS 18661-1:2014.
  3478. ‘nextup’ never raises an exception except for signaling NaNs.
  3479. -- Function: double nextdown (double X)
  3480. -- Function: float nextdownf (float X)
  3481. -- Function: long double nextdownl (long double X)
  3482. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3483. Concepts::.
  3484. The ‘nextdown’ function returns the next representable neighbor of
  3485. X in the direction of negative infinity. If X is the smallest
  3486. positive subnormal number in the type of X the function returns
  3487. ‘+0’. If X = ‘0’ the function returns the smallest negative
  3488. subnormal number in the type of X. If X is NaN, NaN is returned.
  3489. If X is -oo, -oo is returned. ‘nextdown’ is from TS 18661-1:2014.
  3490. ‘nextdown’ never raises an exception except for signaling NaNs.
  3491. -- Function: double nan (const char *TAGP)
  3492. -- Function: float nanf (const char *TAGP)
  3493. -- Function: long double nanl (const char *TAGP)
  3494. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3495. Safety Concepts::.
  3496. The ‘nan’ function returns a representation of NaN, provided that
  3497. NaN is supported by the target platform. ‘nan ("N-CHAR-SEQUENCE")’
  3498. is equivalent to ‘strtod ("NAN(N-CHAR-SEQUENCE)")’.
  3499. The argument TAGP is used in an unspecified manner. On IEEE 754
  3500. systems, there are many representations of NaN, and TAGP selects
  3501. one. On other systems it may do nothing.
  3502. -- Function: int canonicalize (double *CX, const double *X)
  3503. -- Function: int canonicalizef (float *CX, const float *X)
  3504. -- Function: int canonicalizel (long double *CX, const long double *X)
  3505. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3506. Concepts::.
  3507. In some floating-point formats, some values have canonical
  3508. (preferred) and noncanonical encodings (for IEEE interchange binary
  3509. formats, all encodings are canonical). These functions, defined by
  3510. TS 18661-1:2014, attempt to produce a canonical version of the
  3511. floating-point value pointed to by X; if that value is a signaling
  3512. NaN, they raise the invalid exception and produce a quiet NaN. If a
  3513. canonical value is produced, it is stored in the object pointed to
  3514. by CX, and these functions return zero. Otherwise (if a canonical
  3515. value could not be produced because the object pointed to by X is
  3516. not a valid representation of any floating-point value), the object
  3517. pointed to by CX is unchanged and a nonzero value is returned.
  3518. Note that some formats have multiple encodings of a value which are
  3519. all equally canonical; when such an encoding is used as an input to
  3520. this function, any such encoding of the same value (or of the
  3521. corresponding quiet NaN, if that value is a signaling NaN) may be
  3522. produced as output.
  3523. -- Function: double getpayload (const double *X)
  3524. -- Function: float getpayloadf (const float *X)
  3525. -- Function: long double getpayloadl (const long double *X)
  3526. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3527. Concepts::.
  3528. IEEE 754 defines the "payload" of a NaN to be an integer value
  3529. encoded in the representation of the NaN. Payloads are typically
  3530. propagated from NaN inputs to the result of a floating-point
  3531. operation. These functions, defined by TS 18661-1:2014, return the
  3532. payload of the NaN pointed to by X (returned as a positive integer,
  3533. or positive zero, represented as a floating-point number); if X is
  3534. not a NaN, they return an unspecified value. They raise no
  3535. floating-point exceptions even for signaling NaNs.
  3536. -- Function: int setpayload (double *X, double PAYLOAD)
  3537. -- Function: int setpayloadf (float *X, float PAYLOAD)
  3538. -- Function: int setpayloadl (long double *X, long double PAYLOAD)
  3539. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3540. Concepts::.
  3541. These functions, defined by TS 18661-1:2014, set the object pointed
  3542. to by X to a quiet NaN with payload PAYLOAD and a zero sign bit and
  3543. return zero. If PAYLOAD is not a positive-signed integer that is a
  3544. valid payload for a quiet NaN of the given type, the object pointed
  3545. to by X is set to positive zero and a nonzero value is returned.
  3546. They raise no floating-point exceptions.
  3547. -- Function: int setpayloadsig (double *X, double PAYLOAD)
  3548. -- Function: int setpayloadsigf (float *X, float PAYLOAD)
  3549. -- Function: int setpayloadsigl (long double *X, long double PAYLOAD)
  3550. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3551. Concepts::.
  3552. These functions, defined by TS 18661-1:2014, set the object pointed
  3553. to by X to a signaling NaN with payload PAYLOAD and a zero sign bit
  3554. and return zero. If PAYLOAD is not a positive-signed integer that
  3555. is a valid payload for a signaling NaN of the given type, the
  3556. object pointed to by X is set to positive zero and a nonzero value
  3557. is returned. They raise no floating-point exceptions.
  3558. 
  3559. File: libc.info, Node: FP Comparison Functions, Next: Misc FP Arithmetic, Prev: FP Bit Twiddling, Up: Arithmetic Functions
  3560. 20.8.6 Floating-Point Comparison Functions
  3561. ------------------------------------------
  3562. The standard C comparison operators provoke exceptions when one or other
  3563. of the operands is NaN. For example,
  3564. int v = a < 1.0;
  3565. will raise an exception if A is NaN. (This does _not_ happen with ‘==’
  3566. and ‘!=’; those merely return false and true, respectively, when NaN is
  3567. examined.) Frequently this exception is undesirable. ISO C99 therefore
  3568. defines comparison functions that do not raise exceptions when NaN is
  3569. examined. All of the functions are implemented as macros which allow
  3570. their arguments to be of any floating-point type. The macros are
  3571. guaranteed to evaluate their arguments only once. TS 18661-1:2014 adds
  3572. such a macro for an equality comparison that _does_ raise an exception
  3573. for a NaN argument; it also adds functions that provide a total ordering
  3574. on all floating-point values, including NaNs, without raising any
  3575. exceptions even for signaling NaNs.
  3576. -- Macro: int isgreater (_real-floating_ X, _real-floating_ Y)
  3577. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3578. Concepts::.
  3579. This macro determines whether the argument X is greater than Y. It
  3580. is equivalent to ‘(X) > (Y)’, but no exception is raised if X or Y
  3581. are NaN.
  3582. -- Macro: int isgreaterequal (_real-floating_ X, _real-floating_ Y)
  3583. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3584. Concepts::.
  3585. This macro determines whether the argument X is greater than or
  3586. equal to Y. It is equivalent to ‘(X) >= (Y)’, but no exception is
  3587. raised if X or Y are NaN.
  3588. -- Macro: int isless (_real-floating_ X, _real-floating_ Y)
  3589. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3590. Concepts::.
  3591. This macro determines whether the argument X is less than Y. It is
  3592. equivalent to ‘(X) < (Y)’, but no exception is raised if X or Y are
  3593. NaN.
  3594. -- Macro: int islessequal (_real-floating_ X, _real-floating_ Y)
  3595. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3596. Concepts::.
  3597. This macro determines whether the argument X is less than or equal
  3598. to Y. It is equivalent to ‘(X) <= (Y)’, but no exception is raised
  3599. if X or Y are NaN.
  3600. -- Macro: int islessgreater (_real-floating_ X, _real-floating_ Y)
  3601. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3602. Concepts::.
  3603. This macro determines whether the argument X is less or greater
  3604. than Y. It is equivalent to ‘(X) < (Y) || (X) > (Y)’ (although it
  3605. only evaluates X and Y once), but no exception is raised if X or Y
  3606. are NaN.
  3607. This macro is not equivalent to ‘X != Y’, because that expression
  3608. is true if X or Y are NaN.
  3609. -- Macro: int isunordered (_real-floating_ X, _real-floating_ Y)
  3610. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3611. Concepts::.
  3612. This macro determines whether its arguments are unordered. In
  3613. other words, it is true if X or Y are NaN, and false otherwise.
  3614. -- Macro: int iseqsig (_real-floating_ X, _real-floating_ Y)
  3615. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3616. Concepts::.
  3617. This macro determines whether its arguments are equal. It is
  3618. equivalent to ‘(X) == (Y)’, but it raises the invalid exception and
  3619. sets ‘errno’ to ‘EDOM’ if either argument is a NaN.
  3620. -- Function: int totalorder (double X, double Y)
  3621. -- Function: int totalorderf (float X, float Y)
  3622. -- Function: int totalorderl (long double X, long double Y)
  3623. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3624. Concepts::.
  3625. These functions determine whether the total order relationship,
  3626. defined in IEEE 754-2008, is true for X and Y, returning nonzero if
  3627. it is true and zero if it is false. No exceptions are raised even
  3628. for signaling NaNs. The relationship is true if they are the same
  3629. floating-point value (including sign for zero and NaNs, and payload
  3630. for NaNs), or if X comes before Y in the following order: negative
  3631. quiet NaNs, in order of decreasing payload; negative signaling
  3632. NaNs, in order of decreasing payload; negative infinity; finite
  3633. numbers, in ascending order, with negative zero before positive
  3634. zero; positive infinity; positive signaling NaNs, in order of
  3635. increasing payload; positive quiet NaNs, in order of increasing
  3636. payload.
  3637. -- Function: int totalordermag (double X, double Y)
  3638. -- Function: int totalordermagf (float X, float Y)
  3639. -- Function: int totalordermagl (long double X, long double Y)
  3640. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3641. Concepts::.
  3642. These functions determine whether the total order relationship,
  3643. defined in IEEE 754-2008, is true for the absolute values of X and
  3644. Y, returning nonzero if it is true and zero if it is false. No
  3645. exceptions are raised even for signaling NaNs.
  3646. Not all machines provide hardware support for these operations. On
  3647. machines that don’t, the macros can be very slow. Therefore, you should
  3648. not use these functions when NaN is not a concern.
  3649. *NB:* There are no macros ‘isequal’ or ‘isunequal’. They are
  3650. unnecessary, because the ‘==’ and ‘!=’ operators do _not_ throw an
  3651. exception if one or both of the operands are NaN.
  3652. 
  3653. File: libc.info, Node: Misc FP Arithmetic, Prev: FP Comparison Functions, Up: Arithmetic Functions
  3654. 20.8.7 Miscellaneous FP arithmetic functions
  3655. --------------------------------------------
  3656. The functions in this section perform miscellaneous but common
  3657. operations that are awkward to express with C operators. On some
  3658. processors these functions can use special machine instructions to
  3659. perform these operations faster than the equivalent C code.
  3660. -- Function: double fmin (double X, double Y)
  3661. -- Function: float fminf (float X, float Y)
  3662. -- Function: long double fminl (long double X, long double Y)
  3663. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3664. Concepts::.
  3665. The ‘fmin’ function returns the lesser of the two values X and Y.
  3666. It is similar to the expression
  3667. ((x) < (y) ? (x) : (y))
  3668. except that X and Y are only evaluated once.
  3669. If an argument is NaN, the other argument is returned. If both
  3670. arguments are NaN, NaN is returned.
  3671. -- Function: double fmax (double X, double Y)
  3672. -- Function: float fmaxf (float X, float Y)
  3673. -- Function: long double fmaxl (long double X, long double Y)
  3674. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3675. Concepts::.
  3676. The ‘fmax’ function returns the greater of the two values X and Y.
  3677. If an argument is NaN, the other argument is returned. If both
  3678. arguments are NaN, NaN is returned.
  3679. -- Function: double fminmag (double X, double Y)
  3680. -- Function: float fminmagf (float X, float Y)
  3681. -- Function: long double fminmagl (long double X, long double Y)
  3682. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3683. Concepts::.
  3684. These functions, from TS 18661-1:2014, return whichever of the two
  3685. values X and Y has the smaller absolute value. If both have the
  3686. same absolute value, or either is NaN, they behave the same as the
  3687. ‘fmin’ functions.
  3688. -- Function: double fmaxmag (double X, double Y)
  3689. -- Function: float fmaxmagf (float X, float Y)
  3690. -- Function: long double fmaxmagl (long double X, long double Y)
  3691. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3692. Concepts::.
  3693. These functions, from TS 18661-1:2014, return whichever of the two
  3694. values X and Y has the greater absolute value. If both have the
  3695. same absolute value, or either is NaN, they behave the same as the
  3696. ‘fmax’ functions.
  3697. -- Function: double fdim (double X, double Y)
  3698. -- Function: float fdimf (float X, float Y)
  3699. -- Function: long double fdiml (long double X, long double Y)
  3700. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3701. Concepts::.
  3702. The ‘fdim’ function returns the positive difference between X and
  3703. Y. The positive difference is X - Y if X is greater than Y, and 0
  3704. otherwise.
  3705. If X, Y, or both are NaN, NaN is returned.
  3706. -- Function: double fma (double X, double Y, double Z)
  3707. -- Function: float fmaf (float X, float Y, float Z)
  3708. -- Function: long double fmal (long double X, long double Y, long
  3709. double Z)
  3710. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3711. Concepts::.
  3712. The ‘fma’ function performs floating-point multiply-add. This is
  3713. the operation (X * Y) + Z, but the intermediate result is not
  3714. rounded to the destination type. This can sometimes improve the
  3715. precision of a calculation.
  3716. This function was introduced because some processors have a special
  3717. instruction to perform multiply-add. The C compiler cannot use it
  3718. directly, because the expression ‘x*y + z’ is defined to round the
  3719. intermediate result. ‘fma’ lets you choose when you want to round
  3720. only once.
  3721. On processors which do not implement multiply-add in hardware,
  3722. ‘fma’ can be very slow since it must avoid intermediate rounding.
  3723. ‘math.h’ defines the symbols ‘FP_FAST_FMA’, ‘FP_FAST_FMAF’, and
  3724. ‘FP_FAST_FMAL’ when the corresponding version of ‘fma’ is no slower
  3725. than the expression ‘x*y + z’. In the GNU C Library, this always
  3726. means the operation is implemented in hardware.
  3727. 
  3728. File: libc.info, Node: Complex Numbers, Next: Operations on Complex, Prev: Arithmetic Functions, Up: Arithmetic
  3729. 20.9 Complex Numbers
  3730. ====================
  3731. ISO C99 introduces support for complex numbers in C. This is done with a
  3732. new type qualifier, ‘complex’. It is a keyword if and only if
  3733. ‘complex.h’ has been included. There are three complex types,
  3734. corresponding to the three real types: ‘float complex’, ‘double
  3735. complex’, and ‘long double complex’.
  3736. To construct complex numbers you need a way to indicate the imaginary
  3737. part of a number. There is no standard notation for an imaginary
  3738. floating point constant. Instead, ‘complex.h’ defines two macros that
  3739. can be used to create complex numbers.
  3740. -- Macro: const float complex _Complex_I
  3741. This macro is a representation of the complex number “0+1i”.
  3742. Multiplying a real floating-point value by ‘_Complex_I’ gives a
  3743. complex number whose value is purely imaginary. You can use this
  3744. to construct complex constants:
  3745. 3.0 + 4.0i = 3.0 + 4.0 * _Complex_I
  3746. Note that ‘_Complex_I * _Complex_I’ has the value ‘-1’, but the
  3747. type of that value is ‘complex’.
  3748. ‘_Complex_I’ is a bit of a mouthful. ‘complex.h’ also defines a shorter
  3749. name for the same constant.
  3750. -- Macro: const float complex I
  3751. This macro has exactly the same value as ‘_Complex_I’. Most of the
  3752. time it is preferable. However, it causes problems if you want to
  3753. use the identifier ‘I’ for something else. You can safely write
  3754. #include <complex.h>
  3755. #undef I
  3756. if you need ‘I’ for your own purposes. (In that case we recommend
  3757. you also define some other short name for ‘_Complex_I’, such as
  3758. ‘J’.)
  3759. 
  3760. File: libc.info, Node: Operations on Complex, Next: Parsing of Numbers, Prev: Complex Numbers, Up: Arithmetic
  3761. 20.10 Projections, Conjugates, and Decomposing of Complex Numbers
  3762. =================================================================
  3763. ISO C99 also defines functions that perform basic operations on complex
  3764. numbers, such as decomposition and conjugation. The prototypes for all
  3765. these functions are in ‘complex.h’. All functions are available in
  3766. three variants, one for each of the three complex types.
  3767. -- Function: double creal (complex double Z)
  3768. -- Function: float crealf (complex float Z)
  3769. -- Function: long double creall (complex long double Z)
  3770. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3771. Concepts::.
  3772. These functions return the real part of the complex number Z.
  3773. -- Function: double cimag (complex double Z)
  3774. -- Function: float cimagf (complex float Z)
  3775. -- Function: long double cimagl (complex long double Z)
  3776. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3777. Concepts::.
  3778. These functions return the imaginary part of the complex number Z.
  3779. -- Function: complex double conj (complex double Z)
  3780. -- Function: complex float conjf (complex float Z)
  3781. -- Function: complex long double conjl (complex long double Z)
  3782. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3783. Concepts::.
  3784. These functions return the conjugate value of the complex number Z.
  3785. The conjugate of a complex number has the same real part and a
  3786. negated imaginary part. In other words, ‘conj(a + bi) = a + -bi’.
  3787. -- Function: double carg (complex double Z)
  3788. -- Function: float cargf (complex float Z)
  3789. -- Function: long double cargl (complex long double Z)
  3790. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3791. Concepts::.
  3792. These functions return the argument of the complex number Z. The
  3793. argument of a complex number is the angle in the complex plane
  3794. between the positive real axis and a line passing through zero and
  3795. the number. This angle is measured in the usual fashion and ranges
  3796. from -pi to pi.
  3797. ‘carg’ has a branch cut along the negative real axis.
  3798. -- Function: complex double cproj (complex double Z)
  3799. -- Function: complex float cprojf (complex float Z)
  3800. -- Function: complex long double cprojl (complex long double Z)
  3801. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  3802. Concepts::.
  3803. These functions return the projection of the complex value Z onto
  3804. the Riemann sphere. Values with an infinite imaginary part are
  3805. projected to positive infinity on the real axis, even if the real
  3806. part is NaN. If the real part is infinite, the result is equivalent
  3807. to
  3808. INFINITY + I * copysign (0.0, cimag (z))
  3809. 
  3810. File: libc.info, Node: Parsing of Numbers, Next: Printing of Floats, Prev: Operations on Complex, Up: Arithmetic
  3811. 20.11 Parsing of Numbers
  3812. ========================
  3813. This section describes functions for “reading” integer and
  3814. floating-point numbers from a string. It may be more convenient in some
  3815. cases to use ‘sscanf’ or one of the related functions; see *note
  3816. Formatted Input::. But often you can make a program more robust by
  3817. finding the tokens in the string by hand, then converting the numbers
  3818. one by one.
  3819. * Menu:
  3820. * Parsing of Integers:: Functions for conversion of integer values.
  3821. * Parsing of Floats:: Functions for conversion of floating-point
  3822. values.
  3823. 
  3824. File: libc.info, Node: Parsing of Integers, Next: Parsing of Floats, Up: Parsing of Numbers
  3825. 20.11.1 Parsing of Integers
  3826. ---------------------------
  3827. The ‘str’ functions are declared in ‘stdlib.h’ and those beginning with
  3828. ‘wcs’ are declared in ‘wchar.h’. One might wonder about the use of
  3829. ‘restrict’ in the prototypes of the functions in this section. It is
  3830. seemingly useless but the ISO C standard uses it (for the functions
  3831. defined there) so we have to do it as well.
  3832. -- Function: long int strtol (const char *restrict STRING, char
  3833. **restrict TAILPTR, int BASE)
  3834. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3835. Safety Concepts::.
  3836. The ‘strtol’ (“string-to-long”) function converts the initial part
  3837. of STRING to a signed integer, which is returned as a value of type
  3838. ‘long int’.
  3839. This function attempts to decompose STRING as follows:
  3840. • A (possibly empty) sequence of whitespace characters. Which
  3841. characters are whitespace is determined by the ‘isspace’
  3842. function (*note Classification of Characters::). These are
  3843. discarded.
  3844. • An optional plus or minus sign (‘+’ or ‘-’).
  3845. • A nonempty sequence of digits in the radix specified by BASE.
  3846. If BASE is zero, decimal radix is assumed unless the series of
  3847. digits begins with ‘0’ (specifying octal radix), or ‘0x’ or
  3848. ‘0X’ (specifying hexadecimal radix); in other words, the same
  3849. syntax used for integer constants in C.
  3850. Otherwise BASE must have a value between ‘2’ and ‘36’. If
  3851. BASE is ‘16’, the digits may optionally be preceded by ‘0x’ or
  3852. ‘0X’. If base has no legal value the value returned is ‘0l’
  3853. and the global variable ‘errno’ is set to ‘EINVAL’.
  3854. • Any remaining characters in the string. If TAILPTR is not a
  3855. null pointer, ‘strtol’ stores a pointer to this tail in
  3856. ‘*TAILPTR’.
  3857. If the string is empty, contains only whitespace, or does not
  3858. contain an initial substring that has the expected syntax for an
  3859. integer in the specified BASE, no conversion is performed. In this
  3860. case, ‘strtol’ returns a value of zero and the value stored in
  3861. ‘*TAILPTR’ is the value of STRING.
  3862. In a locale other than the standard ‘"C"’ locale, this function may
  3863. recognize additional implementation-dependent syntax.
  3864. If the string has valid syntax for an integer but the value is not
  3865. representable because of overflow, ‘strtol’ returns either
  3866. ‘LONG_MAX’ or ‘LONG_MIN’ (*note Range of Type::), as appropriate
  3867. for the sign of the value. It also sets ‘errno’ to ‘ERANGE’ to
  3868. indicate there was overflow.
  3869. You should not check for errors by examining the return value of
  3870. ‘strtol’, because the string might be a valid representation of
  3871. ‘0l’, ‘LONG_MAX’, or ‘LONG_MIN’. Instead, check whether TAILPTR
  3872. points to what you expect after the number (e.g. ‘'\0'’ if the
  3873. string should end after the number). You also need to clear ERRNO
  3874. before the call and check it afterward, in case there was overflow.
  3875. There is an example at the end of this section.
  3876. -- Function: long int wcstol (const wchar_t *restrict STRING, wchar_t
  3877. **restrict TAILPTR, int BASE)
  3878. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3879. Safety Concepts::.
  3880. The ‘wcstol’ function is equivalent to the ‘strtol’ function in
  3881. nearly all aspects but handles wide character strings.
  3882. The ‘wcstol’ function was introduced in Amendment 1 of ISO C90.
  3883. -- Function: unsigned long int strtoul (const char *retrict STRING,
  3884. char **restrict TAILPTR, int BASE)
  3885. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3886. Safety Concepts::.
  3887. The ‘strtoul’ (“string-to-unsigned-long”) function is like ‘strtol’
  3888. except it converts to an ‘unsigned long int’ value. The syntax is
  3889. the same as described above for ‘strtol’. The value returned on
  3890. overflow is ‘ULONG_MAX’ (*note Range of Type::).
  3891. If STRING depicts a negative number, ‘strtoul’ acts the same as
  3892. STRTOL but casts the result to an unsigned integer. That means for
  3893. example that ‘strtoul’ on ‘"-1"’ returns ‘ULONG_MAX’ and an input
  3894. more negative than ‘LONG_MIN’ returns (‘ULONG_MAX’ + 1) / 2.
  3895. ‘strtoul’ sets ERRNO to ‘EINVAL’ if BASE is out of range, or
  3896. ‘ERANGE’ on overflow.
  3897. -- Function: unsigned long int wcstoul (const wchar_t *restrict STRING,
  3898. wchar_t **restrict TAILPTR, int BASE)
  3899. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3900. Safety Concepts::.
  3901. The ‘wcstoul’ function is equivalent to the ‘strtoul’ function in
  3902. nearly all aspects but handles wide character strings.
  3903. The ‘wcstoul’ function was introduced in Amendment 1 of ISO C90.
  3904. -- Function: long long int strtoll (const char *restrict STRING, char
  3905. **restrict TAILPTR, int BASE)
  3906. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3907. Safety Concepts::.
  3908. The ‘strtoll’ function is like ‘strtol’ except that it returns a
  3909. ‘long long int’ value, and accepts numbers with a correspondingly
  3910. larger range.
  3911. If the string has valid syntax for an integer but the value is not
  3912. representable because of overflow, ‘strtoll’ returns either
  3913. ‘LLONG_MAX’ or ‘LLONG_MIN’ (*note Range of Type::), as appropriate
  3914. for the sign of the value. It also sets ‘errno’ to ‘ERANGE’ to
  3915. indicate there was overflow.
  3916. The ‘strtoll’ function was introduced in ISO C99.
  3917. -- Function: long long int wcstoll (const wchar_t *restrict STRING,
  3918. wchar_t **restrict TAILPTR, int BASE)
  3919. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3920. Safety Concepts::.
  3921. The ‘wcstoll’ function is equivalent to the ‘strtoll’ function in
  3922. nearly all aspects but handles wide character strings.
  3923. The ‘wcstoll’ function was introduced in Amendment 1 of ISO C90.
  3924. -- Function: long long int strtoq (const char *restrict STRING, char
  3925. **restrict TAILPTR, int BASE)
  3926. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3927. Safety Concepts::.
  3928. ‘strtoq’ (“string-to-quad-word”) is the BSD name for ‘strtoll’.
  3929. -- Function: long long int wcstoq (const wchar_t *restrict STRING,
  3930. wchar_t **restrict TAILPTR, int BASE)
  3931. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3932. Safety Concepts::.
  3933. The ‘wcstoq’ function is equivalent to the ‘strtoq’ function in
  3934. nearly all aspects but handles wide character strings.
  3935. The ‘wcstoq’ function is a GNU extension.
  3936. -- Function: unsigned long long int strtoull (const char *restrict
  3937. STRING, char **restrict TAILPTR, int BASE)
  3938. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3939. Safety Concepts::.
  3940. The ‘strtoull’ function is related to ‘strtoll’ the same way
  3941. ‘strtoul’ is related to ‘strtol’.
  3942. The ‘strtoull’ function was introduced in ISO C99.
  3943. -- Function: unsigned long long int wcstoull (const wchar_t *restrict
  3944. STRING, wchar_t **restrict TAILPTR, int BASE)
  3945. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3946. Safety Concepts::.
  3947. The ‘wcstoull’ function is equivalent to the ‘strtoull’ function in
  3948. nearly all aspects but handles wide character strings.
  3949. The ‘wcstoull’ function was introduced in Amendment 1 of ISO C90.
  3950. -- Function: unsigned long long int strtouq (const char *restrict
  3951. STRING, char **restrict TAILPTR, int BASE)
  3952. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3953. Safety Concepts::.
  3954. ‘strtouq’ is the BSD name for ‘strtoull’.
  3955. -- Function: unsigned long long int wcstouq (const wchar_t *restrict
  3956. STRING, wchar_t **restrict TAILPTR, int BASE)
  3957. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3958. Safety Concepts::.
  3959. The ‘wcstouq’ function is equivalent to the ‘strtouq’ function in
  3960. nearly all aspects but handles wide character strings.
  3961. The ‘wcstouq’ function is a GNU extension.
  3962. -- Function: intmax_t strtoimax (const char *restrict STRING, char
  3963. **restrict TAILPTR, int BASE)
  3964. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3965. Safety Concepts::.
  3966. The ‘strtoimax’ function is like ‘strtol’ except that it returns a
  3967. ‘intmax_t’ value, and accepts numbers of a corresponding range.
  3968. If the string has valid syntax for an integer but the value is not
  3969. representable because of overflow, ‘strtoimax’ returns either
  3970. ‘INTMAX_MAX’ or ‘INTMAX_MIN’ (*note Integers::), as appropriate for
  3971. the sign of the value. It also sets ‘errno’ to ‘ERANGE’ to
  3972. indicate there was overflow.
  3973. See *note Integers:: for a description of the ‘intmax_t’ type. The
  3974. ‘strtoimax’ function was introduced in ISO C99.
  3975. -- Function: intmax_t wcstoimax (const wchar_t *restrict STRING,
  3976. wchar_t **restrict TAILPTR, int BASE)
  3977. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3978. Safety Concepts::.
  3979. The ‘wcstoimax’ function is equivalent to the ‘strtoimax’ function
  3980. in nearly all aspects but handles wide character strings.
  3981. The ‘wcstoimax’ function was introduced in ISO C99.
  3982. -- Function: uintmax_t strtoumax (const char *restrict STRING, char
  3983. **restrict TAILPTR, int BASE)
  3984. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3985. Safety Concepts::.
  3986. The ‘strtoumax’ function is related to ‘strtoimax’ the same way
  3987. that ‘strtoul’ is related to ‘strtol’.
  3988. See *note Integers:: for a description of the ‘intmax_t’ type. The
  3989. ‘strtoumax’ function was introduced in ISO C99.
  3990. -- Function: uintmax_t wcstoumax (const wchar_t *restrict STRING,
  3991. wchar_t **restrict TAILPTR, int BASE)
  3992. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3993. Safety Concepts::.
  3994. The ‘wcstoumax’ function is equivalent to the ‘strtoumax’ function
  3995. in nearly all aspects but handles wide character strings.
  3996. The ‘wcstoumax’ function was introduced in ISO C99.
  3997. -- Function: long int atol (const char *STRING)
  3998. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  3999. Safety Concepts::.
  4000. This function is similar to the ‘strtol’ function with a BASE
  4001. argument of ‘10’, except that it need not detect overflow errors.
  4002. The ‘atol’ function is provided mostly for compatibility with
  4003. existing code; using ‘strtol’ is more robust.
  4004. -- Function: int atoi (const char *STRING)
  4005. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  4006. Safety Concepts::.
  4007. This function is like ‘atol’, except that it returns an ‘int’. The
  4008. ‘atoi’ function is also considered obsolete; use ‘strtol’ instead.
  4009. -- Function: long long int atoll (const char *STRING)
  4010. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  4011. Safety Concepts::.
  4012. This function is similar to ‘atol’, except it returns a ‘long long
  4013. int’.
  4014. The ‘atoll’ function was introduced in ISO C99. It too is obsolete
  4015. (despite having just been added); use ‘strtoll’ instead.
  4016. All the functions mentioned in this section so far do not handle
  4017. alternative representations of characters as described in the locale
  4018. data. Some locales specify thousands separator and the way they have to
  4019. be used which can help to make large numbers more readable. To read
  4020. such numbers one has to use the ‘scanf’ functions with the ‘'’ flag.
  4021. Here is a function which parses a string as a sequence of integers
  4022. and returns the sum of them:
  4023. int
  4024. sum_ints_from_string (char *string)
  4025. {
  4026. int sum = 0;
  4027. while (1) {
  4028. char *tail;
  4029. int next;
  4030. /* Skip whitespace by hand, to detect the end. */
  4031. while (isspace (*string)) string++;
  4032. if (*string == 0)
  4033. break;
  4034. /* There is more nonwhitespace, */
  4035. /* so it ought to be another number. */
  4036. errno = 0;
  4037. /* Parse it. */
  4038. next = strtol (string, &tail, 0);
  4039. /* Add it in, if not overflow. */
  4040. if (errno)
  4041. printf ("Overflow\n");
  4042. else
  4043. sum += next;
  4044. /* Advance past it. */
  4045. string = tail;
  4046. }
  4047. return sum;
  4048. }
  4049. 
  4050. File: libc.info, Node: Parsing of Floats, Prev: Parsing of Integers, Up: Parsing of Numbers
  4051. 20.11.2 Parsing of Floats
  4052. -------------------------
  4053. The ‘str’ functions are declared in ‘stdlib.h’ and those beginning with
  4054. ‘wcs’ are declared in ‘wchar.h’. One might wonder about the use of
  4055. ‘restrict’ in the prototypes of the functions in this section. It is
  4056. seemingly useless but the ISO C standard uses it (for the functions
  4057. defined there) so we have to do it as well.
  4058. -- Function: double strtod (const char *restrict STRING, char
  4059. **restrict TAILPTR)
  4060. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  4061. Safety Concepts::.
  4062. The ‘strtod’ (“string-to-double”) function converts the initial
  4063. part of STRING to a floating-point number, which is returned as a
  4064. value of type ‘double’.
  4065. This function attempts to decompose STRING as follows:
  4066. • A (possibly empty) sequence of whitespace characters. Which
  4067. characters are whitespace is determined by the ‘isspace’
  4068. function (*note Classification of Characters::). These are
  4069. discarded.
  4070. • An optional plus or minus sign (‘+’ or ‘-’).
  4071. • A floating point number in decimal or hexadecimal format. The
  4072. decimal format is:
  4073. − A nonempty sequence of digits optionally containing a
  4074. decimal-point character—normally ‘.’, but it depends on
  4075. the locale (*note General Numeric::).
  4076. − An optional exponent part, consisting of a character ‘e’
  4077. or ‘E’, an optional sign, and a sequence of digits.
  4078. The hexadecimal format is as follows:
  4079. − A 0x or 0X followed by a nonempty sequence of hexadecimal
  4080. digits optionally containing a decimal-point
  4081. character—normally ‘.’, but it depends on the locale
  4082. (*note General Numeric::).
  4083. − An optional binary-exponent part, consisting of a
  4084. character ‘p’ or ‘P’, an optional sign, and a sequence of
  4085. digits.
  4086. • Any remaining characters in the string. If TAILPTR is not a
  4087. null pointer, a pointer to this tail of the string is stored
  4088. in ‘*TAILPTR’.
  4089. If the string is empty, contains only whitespace, or does not
  4090. contain an initial substring that has the expected syntax for a
  4091. floating-point number, no conversion is performed. In this case,
  4092. ‘strtod’ returns a value of zero and the value returned in
  4093. ‘*TAILPTR’ is the value of STRING.
  4094. In a locale other than the standard ‘"C"’ or ‘"POSIX"’ locales,
  4095. this function may recognize additional locale-dependent syntax.
  4096. If the string has valid syntax for a floating-point number but the
  4097. value is outside the range of a ‘double’, ‘strtod’ will signal
  4098. overflow or underflow as described in *note Math Error Reporting::.
  4099. ‘strtod’ recognizes four special input strings. The strings
  4100. ‘"inf"’ and ‘"infinity"’ are converted to oo, or to the largest
  4101. representable value if the floating-point format doesn’t support
  4102. infinities. You can prepend a ‘"+"’ or ‘"-"’ to specify the sign.
  4103. Case is ignored when scanning these strings.
  4104. The strings ‘"nan"’ and ‘"nan(CHARS…)"’ are converted to NaN.
  4105. Again, case is ignored. If CHARS… are provided, they are used in
  4106. some unspecified fashion to select a particular representation of
  4107. NaN (there can be several).
  4108. Since zero is a valid result as well as the value returned on
  4109. error, you should check for errors in the same way as for ‘strtol’,
  4110. by examining ERRNO and TAILPTR.
  4111. -- Function: float strtof (const char *STRING, char **TAILPTR)
  4112. -- Function: long double strtold (const char *STRING, char **TAILPTR)
  4113. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  4114. Safety Concepts::.
  4115. These functions are analogous to ‘strtod’, but return ‘float’ and
  4116. ‘long double’ values respectively. They report errors in the same
  4117. way as ‘strtod’. ‘strtof’ can be substantially faster than
  4118. ‘strtod’, but has less precision; conversely, ‘strtold’ can be much
  4119. slower but has more precision (on systems where ‘long double’ is a
  4120. separate type).
  4121. These functions have been GNU extensions and are new to ISO C99.
  4122. -- Function: double wcstod (const wchar_t *restrict STRING, wchar_t
  4123. **restrict TAILPTR)
  4124. -- Function: float wcstof (const wchar_t *STRING, wchar_t **TAILPTR)
  4125. -- Function: long double wcstold (const wchar_t *STRING, wchar_t
  4126. **TAILPTR)
  4127. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  4128. Safety Concepts::.
  4129. The ‘wcstod’, ‘wcstof’, and ‘wcstol’ functions are equivalent in
  4130. nearly all aspect to the ‘strtod’, ‘strtof’, and ‘strtold’
  4131. functions but it handles wide character string.
  4132. The ‘wcstod’ function was introduced in Amendment 1 of ISO C90.
  4133. The ‘wcstof’ and ‘wcstold’ functions were introduced in ISO C99.
  4134. -- Function: double atof (const char *STRING)
  4135. Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
  4136. Safety Concepts::.
  4137. This function is similar to the ‘strtod’ function, except that it
  4138. need not detect overflow and underflow errors. The ‘atof’ function
  4139. is provided mostly for compatibility with existing code; using
  4140. ‘strtod’ is more robust.
  4141. The GNU C Library also provides ‘_l’ versions of these functions,
  4142. which take an additional argument, the locale to use in conversion.
  4143. See also *note Parsing of Integers::.
  4144. 
  4145. File: libc.info, Node: Printing of Floats, Next: System V Number Conversion, Prev: Parsing of Numbers, Up: Arithmetic
  4146. 20.12 Printing of Floats
  4147. ========================
  4148. The ‘strfrom’ functions are declared in ‘stdlib.h’.
  4149. -- Function: int strfromd (char *restrict STRING, size_t SIZE, const
  4150. char *restrict FORMAT, double VALUE)
  4151. -- Function: int strfromf (char *restrict STRING, size_t SIZE, const
  4152. char *restrict FORMAT, float VALUE)
  4153. -- Function: int strfroml (char *restrict STRING, size_t SIZE, const
  4154. char *restrict FORMAT, long double VALUE)
  4155. Preliminary: | MT-Safe locale | AS-Unsafe heap | AC-Unsafe mem |
  4156. *Note POSIX Safety Concepts::.
  4157. The functions ‘strfromd’ (“string-from-double”), ‘strfromf’
  4158. (“string-from-float”), and ‘strfroml’ (“string-from-long-double”)
  4159. convert the floating-point number VALUE to a string of characters
  4160. and stores them into the area pointed to by STRING. The conversion
  4161. writes at most SIZE characters and respects the format specified by
  4162. FORMAT.
  4163. The format string must start with the character ‘%’. An optional
  4164. precision follows, which starts with a period, ‘.’, and may be
  4165. followed by a decimal integer, representing the precision. If a
  4166. decimal integer is not specified after the period, the precision is
  4167. taken to be zero. The character ‘*’ is not allowed. Finally, the
  4168. format string ends with one of the following conversion specifiers:
  4169. ‘a’, ‘A’, ‘e’, ‘E’, ‘f’, ‘F’, ‘g’ or ‘G’ (*note Table of Output
  4170. Conversions::). Invalid format strings result in undefined
  4171. behavior.
  4172. These functions return the number of characters that would have
  4173. been written to STRING had SIZE been sufficiently large, not
  4174. counting the terminating null character. Thus, the null-terminated
  4175. output has been completely written if and only if the returned
  4176. value is less than SIZE.
  4177. These functions were introduced by ISO/IEC TS 18661-1.
  4178. 
  4179. File: libc.info, Node: System V Number Conversion, Prev: Printing of Floats, Up: Arithmetic
  4180. 20.13 Old-fashioned System V number-to-string functions
  4181. =======================================================
  4182. The old System V C library provided three functions to convert numbers
  4183. to strings, with unusual and hard-to-use semantics. The GNU C Library
  4184. also provides these functions and some natural extensions.
  4185. These functions are only available in the GNU C Library and on
  4186. systems descended from AT&T Unix. Therefore, unless these functions do
  4187. precisely what you need, it is better to use ‘sprintf’, which is
  4188. standard.
  4189. All these functions are defined in ‘stdlib.h’.
  4190. -- Function: char * ecvt (double VALUE, int NDIGIT, int *DECPT, int
  4191. *NEG)
  4192. Preliminary: | MT-Unsafe race:ecvt | AS-Unsafe | AC-Safe | *Note
  4193. POSIX Safety Concepts::.
  4194. The function ‘ecvt’ converts the floating-point number VALUE to a
  4195. string with at most NDIGIT decimal digits. The returned string
  4196. contains no decimal point or sign. The first digit of the string
  4197. is non-zero (unless VALUE is actually zero) and the last digit is
  4198. rounded to nearest. ‘*DECPT’ is set to the index in the string of
  4199. the first digit after the decimal point. ‘*NEG’ is set to a
  4200. nonzero value if VALUE is negative, zero otherwise.
  4201. If NDIGIT decimal digits would exceed the precision of a ‘double’
  4202. it is reduced to a system-specific value.
  4203. The returned string is statically allocated and overwritten by each
  4204. call to ‘ecvt’.
  4205. If VALUE is zero, it is implementation defined whether ‘*DECPT’ is
  4206. ‘0’ or ‘1’.
  4207. For example: ‘ecvt (12.3, 5, &d, &n)’ returns ‘"12300"’ and sets D
  4208. to ‘2’ and N to ‘0’.
  4209. -- Function: char * fcvt (double VALUE, int NDIGIT, int *DECPT, int
  4210. *NEG)
  4211. Preliminary: | MT-Unsafe race:fcvt | AS-Unsafe heap | AC-Unsafe mem
  4212. | *Note POSIX Safety Concepts::.
  4213. The function ‘fcvt’ is like ‘ecvt’, but NDIGIT specifies the number
  4214. of digits after the decimal point. If NDIGIT is less than zero,
  4215. VALUE is rounded to the NDIGIT+1’th place to the left of the
  4216. decimal point. For example, if NDIGIT is ‘-1’, VALUE will be
  4217. rounded to the nearest 10. If NDIGIT is negative and larger than
  4218. the number of digits to the left of the decimal point in VALUE,
  4219. VALUE will be rounded to one significant digit.
  4220. If NDIGIT decimal digits would exceed the precision of a ‘double’
  4221. it is reduced to a system-specific value.
  4222. The returned string is statically allocated and overwritten by each
  4223. call to ‘fcvt’.
  4224. -- Function: char * gcvt (double VALUE, int NDIGIT, char *BUF)
  4225. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4226. Concepts::.
  4227. ‘gcvt’ is functionally equivalent to ‘sprintf(buf, "%*g", ndigit,
  4228. value’. It is provided only for compatibility’s sake. It returns
  4229. BUF.
  4230. If NDIGIT decimal digits would exceed the precision of a ‘double’
  4231. it is reduced to a system-specific value.
  4232. As extensions, the GNU C Library provides versions of these three
  4233. functions that take ‘long double’ arguments.
  4234. -- Function: char * qecvt (long double VALUE, int NDIGIT, int *DECPT,
  4235. int *NEG)
  4236. Preliminary: | MT-Unsafe race:qecvt | AS-Unsafe | AC-Safe | *Note
  4237. POSIX Safety Concepts::.
  4238. This function is equivalent to ‘ecvt’ except that it takes a ‘long
  4239. double’ for the first parameter and that NDIGIT is restricted by
  4240. the precision of a ‘long double’.
  4241. -- Function: char * qfcvt (long double VALUE, int NDIGIT, int *DECPT,
  4242. int *NEG)
  4243. Preliminary: | MT-Unsafe race:qfcvt | AS-Unsafe heap | AC-Unsafe
  4244. mem | *Note POSIX Safety Concepts::.
  4245. This function is equivalent to ‘fcvt’ except that it takes a ‘long
  4246. double’ for the first parameter and that NDIGIT is restricted by
  4247. the precision of a ‘long double’.
  4248. -- Function: char * qgcvt (long double VALUE, int NDIGIT, char *BUF)
  4249. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4250. Concepts::.
  4251. This function is equivalent to ‘gcvt’ except that it takes a ‘long
  4252. double’ for the first parameter and that NDIGIT is restricted by
  4253. the precision of a ‘long double’.
  4254. The ‘ecvt’ and ‘fcvt’ functions, and their ‘long double’ equivalents,
  4255. all return a string located in a static buffer which is overwritten by
  4256. the next call to the function. The GNU C Library provides another set
  4257. of extended functions which write the converted string into a
  4258. user-supplied buffer. These have the conventional ‘_r’ suffix.
  4259. ‘gcvt_r’ is not necessary, because ‘gcvt’ already uses a
  4260. user-supplied buffer.
  4261. -- Function: int ecvt_r (double VALUE, int NDIGIT, int *DECPT, int
  4262. *NEG, char *BUF, size_t LEN)
  4263. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4264. Concepts::.
  4265. The ‘ecvt_r’ function is the same as ‘ecvt’, except that it places
  4266. its result into the user-specified buffer pointed to by BUF, with
  4267. length LEN. The return value is ‘-1’ in case of an error and zero
  4268. otherwise.
  4269. This function is a GNU extension.
  4270. -- Function: int fcvt_r (double VALUE, int NDIGIT, int *DECPT, int
  4271. *NEG, char *BUF, size_t LEN)
  4272. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4273. Concepts::.
  4274. The ‘fcvt_r’ function is the same as ‘fcvt’, except that it places
  4275. its result into the user-specified buffer pointed to by BUF, with
  4276. length LEN. The return value is ‘-1’ in case of an error and zero
  4277. otherwise.
  4278. This function is a GNU extension.
  4279. -- Function: int qecvt_r (long double VALUE, int NDIGIT, int *DECPT,
  4280. int *NEG, char *BUF, size_t LEN)
  4281. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4282. Concepts::.
  4283. The ‘qecvt_r’ function is the same as ‘qecvt’, except that it
  4284. places its result into the user-specified buffer pointed to by BUF,
  4285. with length LEN. The return value is ‘-1’ in case of an error and
  4286. zero otherwise.
  4287. This function is a GNU extension.
  4288. -- Function: int qfcvt_r (long double VALUE, int NDIGIT, int *DECPT,
  4289. int *NEG, char *BUF, size_t LEN)
  4290. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4291. Concepts::.
  4292. The ‘qfcvt_r’ function is the same as ‘qfcvt’, except that it
  4293. places its result into the user-specified buffer pointed to by BUF,
  4294. with length LEN. The return value is ‘-1’ in case of an error and
  4295. zero otherwise.
  4296. This function is a GNU extension.
  4297. 
  4298. File: libc.info, Node: Date and Time, Next: Resource Usage And Limitation, Prev: Arithmetic, Up: Top
  4299. 21 Date and Time
  4300. ****************
  4301. This chapter describes functions for manipulating dates and times,
  4302. including functions for determining what time it is and conversion
  4303. between different time representations.
  4304. * Menu:
  4305. * Time Basics:: Concepts and definitions.
  4306. * Elapsed Time:: Data types to represent elapsed times
  4307. * Processor And CPU Time:: Time a program has spent executing.
  4308. * Calendar Time:: Manipulation of “real” dates and times.
  4309. * Setting an Alarm:: Sending a signal after a specified time.
  4310. * Sleeping:: Waiting for a period of time.
  4311. 
  4312. File: libc.info, Node: Time Basics, Next: Elapsed Time, Up: Date and Time
  4313. 21.1 Time Basics
  4314. ================
  4315. Discussing time in a technical manual can be difficult because the word
  4316. “time” in English refers to lots of different things. In this manual,
  4317. we use a rigorous terminology to avoid confusion, and the only thing we
  4318. use the simple word “time” for is to talk about the abstract concept.
  4319. A "calendar time" is a point in the time continuum, for example
  4320. November 4, 1990, at 18:02.5 UTC. Sometimes this is called “absolute
  4321. time”.
  4322. We don’t speak of a “date”, because that is inherent in a calendar
  4323. time.
  4324. An "interval" is a contiguous part of the time continuum between two
  4325. calendar times, for example the hour between 9:00 and 10:00 on July 4,
  4326. 1980.
  4327. An "elapsed time" is the length of an interval, for example, 35
  4328. minutes. People sometimes sloppily use the word “interval” to refer to
  4329. the elapsed time of some interval.
  4330. An "amount of time" is a sum of elapsed times, which need not be of
  4331. any specific intervals. For example, the amount of time it takes to
  4332. read a book might be 9 hours, independently of when and in how many
  4333. sittings it is read.
  4334. A "period" is the elapsed time of an interval between two events,
  4335. especially when they are part of a sequence of regularly repeating
  4336. events.
  4337. "CPU time" is like calendar time, except that it is based on the
  4338. subset of the time continuum when a particular process is actively using
  4339. a CPU. CPU time is, therefore, relative to a process.
  4340. "Processor time" is an amount of time that a CPU is in use. In fact,
  4341. it’s a basic system resource, since there’s a limit to how much can
  4342. exist in any given interval (that limit is the elapsed time of the
  4343. interval times the number of CPUs in the processor). People often call
  4344. this CPU time, but we reserve the latter term in this manual for the
  4345. definition above.
  4346. 
  4347. File: libc.info, Node: Elapsed Time, Next: Processor And CPU Time, Prev: Time Basics, Up: Date and Time
  4348. 21.2 Elapsed Time
  4349. =================
  4350. One way to represent an elapsed time is with a simple arithmetic data
  4351. type, as with the following function to compute the elapsed time between
  4352. two calendar times. This function is declared in ‘time.h’.
  4353. -- Function: double difftime (time_t TIME1, time_t TIME0)
  4354. Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety
  4355. Concepts::.
  4356. The ‘difftime’ function returns the number of seconds of elapsed
  4357. time between calendar time TIME1 and calendar time TIME0, as a
  4358. value of type ‘double’. The difference ignores leap seconds unless
  4359. leap second support is enabled.
  4360. In the GNU C Library, you can simply subtract ‘time_t’ values. But
  4361. on other systems, the ‘time_t’ data type might use some other
  4362. encoding where subtraction doesn’t work directly.
  4363. The GNU C Library provides two data types specifically for
  4364. representing an elapsed time. They are used by various GNU C Library
  4365. functions, and you can use them for your own purposes too. They’re
  4366. exactly the same except that one has a resolution in microseconds, and
  4367. the other, newer one, is in nanoseconds.
  4368. -- Data Type: struct timeval
  4369. The ‘struct timeval’ structure represents an elapsed time. It is
  4370. declared in ‘sys/time.h’ and has the following members:
  4371. ‘time_t tv_sec’
  4372. This represents the number of whole seconds of elapsed time.
  4373. ‘long int tv_usec’
  4374. This is the rest of the elapsed time (a fraction of a second),
  4375. represented as the number of microseconds. It is always less
  4376. than one million.
  4377. -- Data Type: struct timespec
  4378. The ‘struct timespec’ structure represents an elapsed time. It is
  4379. declared in ‘time.h’ and has the following members:
  4380. ‘time_t tv_sec’
  4381. This represents the number of whole seconds of elapsed time.
  4382. ‘long int tv_nsec’
  4383. This is the rest of the elapsed time (a fraction of a second),
  4384. represented as the number of nanoseconds. It is always less
  4385. than one billion.
  4386. It is often necessary to subtract two values of type ‘struct timeval’
  4387. or ‘struct timespec’. Here is the best way to do this. It works even
  4388. on some peculiar operating systems where the ‘tv_sec’ member has an
  4389. unsigned type.
  4390. /* Subtract the ‘struct timeval’ values X and Y,
  4391. storing the result in RESULT.
  4392. Return 1 if the difference is negative, otherwise 0. */
  4393. int
  4394. timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y)
  4395. {
  4396. /* Perform the carry for the later subtraction by updating Y. */
  4397. if (x->tv_usec < y->tv_usec) {
  4398. int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
  4399. y->tv_usec -= 1000000 * nsec;
  4400. y->tv_sec += nsec;
  4401. }
  4402. if (x->tv_usec - y->tv_usec > 1000000) {
  4403. int nsec = (x->tv_usec - y->tv_usec) / 1000000;
  4404. y->tv_usec += 1000000 * nsec;
  4405. y->tv_sec -= nsec;
  4406. }
  4407. /* Compute the time remaining to wait.
  4408. ‘tv_usec’ is certainly positive. */
  4409. result->tv_sec = x->tv_sec - y->tv_sec;
  4410. result->tv_usec = x->tv_usec - y->tv_usec;
  4411. /* Return 1 if result is negative. */
  4412. return x->tv_sec < y->tv_sec;
  4413. }
  4414. Common functions that use ‘struct timeval’ are ‘gettimeofday’ and
  4415. ‘settimeofday’.
  4416. There are no GNU C Library functions specifically oriented toward
  4417. dealing with elapsed times, but the calendar time, processor time, and
  4418. alarm and sleeping functions have a lot to do with them.
  4419. 
  4420. File: libc.info, Node: Processor And CPU Time, Next: Calendar Time, Prev: Elapsed Time, Up: Date and Time
  4421. 21.3 Processor And CPU Time
  4422. ===========================
  4423. If you’re trying to optimize your program or measure its efficiency,
  4424. it’s very useful to know how much processor time it uses. For that,
  4425. calendar time and elapsed times are useless because a process may spend
  4426. time waiting for I/O or for other processes to use the CPU. However, you
  4427. can get the information with the functions in this section.
  4428. CPU time (*note Time Basics::) is represented by the data type
  4429. ‘clock_t’, which is a number of "clock ticks". It gives the total
  4430. amount of time a process has actively used a CPU since some arbitrary
  4431. event. On GNU systems, that event is the creation of the process.
  4432. While arbitrary in general, the event is always the same event for any
  4433. particular process, so you can always measure how much time on the CPU a
  4434. particular computation takes by examining the process’ CPU time before
  4435. and after the computation.
  4436. On GNU/Linux and GNU/Hurd systems, ‘clock_t’ is equivalent to ‘long
  4437. int’ and ‘CLOCKS_PER_SEC’ is an integer value. But in other systems,
  4438. both ‘clock_t’ and the macro ‘CLOCKS_PER_SEC’ can be either integer or
  4439. floating-point types. Casting CPU time values to ‘double’, as in the
  4440. example above, makes sure that operations such as arithmetic and
  4441. printing work properly and consistently no matter what the underlying
  4442. representation is.
  4443. Note that the clock can wrap around. On a 32bit system with
  4444. ‘CLOCKS_PER_SEC’ set to one million this function will return the same
  4445. value approximately every 72 minutes.
  4446. For additional functions to examine a process’ use of processor time,
  4447. and to control it, see *note Resource Usage And Limitation::.
  4448. * Menu:
  4449. * CPU Time:: The ‘clock’ function.
  4450. * Processor Time:: The ‘times’ function.