factorial of very big number like 4096

M

mailursubbu

Hi

How to write a program to get the factorial of 4096.
I am working on a Linux m/c.

Best Regards,
Subra
 
S

Spiros Bousbouras

Hi

How to write a program to get the factorial of 4096.
I am working on a Linux m/c.

The simplest and ***out of topic*** answer is to
write
echo 'a=1 ; for (b=1;b<4097;b++) {a = a *b} ; a' | bc

But since you posted here I assume that you want to do
it with C. Then you can download a big numbers library
and use that. (I'm assuming that you know how to write
a programme which calculates a smaller factorial.) I have
not directly used any bignums libraries myself so I can't
recomment any from experience but one can be found
at http://www.swox.com/gmp/#WHAT

Bear in mind that discussion of libraries outside the C
standard is out of topic for this group. If you want to do
everything from scratch then you would need to write
your own function for multiplication of integers of
unlimited size which is not particularly hard but I don't
have any quick advice on how to do it.
 
R

Richard Heathfield

(e-mail address removed) said:
Hi

How to write a program to get the factorial of 4096.

#include <stdio.h>

int main(void)
{
const char *f4096[] =
{
"36427363894570419315658274703116469205712449235098",
"55429950938484780378749358324138749113885226019241",
"40891623559751804416272059989050947403083905593144",
"60714086478086556387708301685874429122262002873651",
"83591438850774768282360528112152265779773669000034",
"86516084407006124804757734802670252003255573271909",
"40507040548909593911164433288212729920687676754028",
"78271433441391317409720563538261546971153120920710",
"48875123602717508202331490356780500479545365440905",
"61291694863670587872515754423200342792488252348768",
"80539531943288352982170364387459832260724861724010",
"73086432340778391528724436743763446801685568833263",
"73863958049769348649991349895178910490897544145740",
"97570875834634480771125630588623716189009401636330",
"53646993798805858616415177816195672825567716704614",
"58396978625340803923658485435690864317795307693130",
"10272016216402659916604261115195019689311226796093",
"94928458398078100113442228613143904163956274722899",
"43227918238117580143172943623664778882805483013877",
"51055640285035342062130461816606396865956896302866",
"41598194855461165121960746503127778591908645352536",
"97646914221190439078208345723015514900232490211449",
"66944530403016451141560850384057138717452521631810",
"12414117847330924157706064661223486314733327431651",
"55479655672025874105055481263874005459632091967813",
"52571571658969317043330854823715806016860179823992",
"10625094851407596769999413049147266421215221178538",
"84453970956864055502349087487927761994295569654129",
"30331971487034504772117133692421577264115179273885",
"90616237286137120137042922988454003047849833760673",
"01622317024839844784260626059272217449005535883839",
"21258299912148364498891628563102941971199975150288",
"19431794525437180923381816442983789306703885638574",
"34306504439572867011371635599296477673657497119956",
"82054809284310521932937494891771568624272238162872",
"54733997372828715556763095744254521708286724240555",
"01373389903877982683044205234420875335795288797702",
"18150336769594612314349050445194979784468837856037",
"91720709320311662885681041694000355495940965566640",
"02145950937081519805957187866300267500791409139510",
"55794293882106324205779318713291201688199480753754",
"91689564836729652295536675468060137806332182604573",
"63147094605620861296822434423389899483647144554802",
"37716740880472951168530145620726950237355341505901",
"23829829023175320390898489714616191079152500160148",
"31236238538654814899946923963025958868571594014445",
"82155015408964698160334009318202620174534575763136",
"58258905629556656958662497665454332919551038868983",
"26762989686539642896967252134101348149659861882396",
"07858972919059076369412947251180032927721883726329",
"49960664158503313136448068629511935929651312969971",
"13366140964904012852575902916612909808769287250462",
"80996708164986922648646620734335716897683511508102",
"37100749684914817871679652216950612271232355403134",
"08515421598762783465929494885178836710509866954865",
"72486600455157521345697653628462127962844098228042",
"10093887097271062618886280887810191956739547356974",
"73947722487596158018686154982482419695858939422024",
"90020988515906761786577989380382151269654391629331",
"64022458962606534189827026386527559579652045420753",
"08648066695506045939594976680223851292939673988282",
"72447772158072172866057547619930274646060607934092",
"48319488688259841640493639590264707610618381285762",
"38203270311047899093902373083298363898904195897388",
"27759364769203014280477447075616148243944428719763",
"96883082630843110487402814537646791228130895046515",
"04591439196427559223114960177985321750434628549932",
"13469300413367478759629810228589249461560060224804",
"45428436062909030983354170826460690411699726669245",
"49725975639611641864825702539295044199173815566428",
"04642286722196264401610509387389496007731450445478",
"60243262059035557928212018966452513951454067335909",
"37151664875034296947590438533439511479884543864865",
"20705893065917354488237509353475657229543651130522",
"62359425183149146515606586288552808594755228662940",
"13780232652246088796742744410487823989893404158496",
"39976263021898880679736762302016905616356289590740",
"46073991860219431450987628441036526644442153282467",
"67771938412481175164652554717274679537237769976583",
"82697151397099264203240716449940026958737060110100",
"84140358417913631534698206709614694213091003748850",
"51917475421991193515227483095060948624012247727494",
"99481753613258039658936687564769991984773935694839",
"83568588015568938889925410408979078954780434059273",
"78566892901025360707243230429385406619801104808343",
"12882195404514291670830967973936561148768866208270",
"72968211125333515167730503439910157885761326190575",
"88917857745748905303371752592099136703165151282333",
"10049449932334712803194849769028817663944754615259",
"91737720009115652978418284853009372535302633741167",
"22682295128167032344694730137174975142011502398045",
"56209240323006295602061664458780400581509997406910",
"18322106737571639250383698914898855184176622054522",
"42000145207860419586577722128862876236996653950204",
"96723830115480391994551202503486020032120253931623",
"36940063591684394080912559276424035181045592412927",
"62606479904975841448840597757301326350410559925209",
"04461822723252567291373469781792196782467522238808",
"84692517978816838410176242510866271824695293539565",
"62118710750276615251150565749892292784621212796020",
"01803697325110887398055343449473123184477950919915",
"64251268676423355849668266159481493700856673636672",
"62521228939127707568060145102197241026496075765556",
"76035558191889917718081720579548920072152611708737",
"26241172393763218260229718814603574218473998207157",
"08016704792784751622932020507878800446735727227557",
"66230741844849209817541724069809633609791870750786",
"41110772014094850639445341168955848573268729666007",
"20593460241199302470500751280099146054229040145877",
"50564251991992938797626582893936327791087446318118",
"25828634918818364668835053658683687739654870089250",
"79905315601292639732624951342568015746005679206926",
"18471418493445944375146033750884841549348593994504",
"03643927321803663661275933332699744411959049037476",
"38859509045882355160956272419918279149451849921959",
"06446378935767862196706569624537514165668859660007",
"97106011597388451804556408721378565160521434260807",
"65127676969519251260568362461233941968326661700780",
"75852381724481066265808253721633517527983579236919",
"11782400981004194131471737120941029047130452335046",
"01083536639416323032453223515113183634999810490717",
"82628193546061459233710571274139572290795063992479",
"30047442055291984569372722568090903922877600905502",
"00627556897111458883593743149047973551953559201787",
"39759927546350458771828839463699552111367253119999",
"29461773000875067305557158363491884187912686093334",
"00033481253670641439295406830971241961493932977812",
"45904845592744215464329978728696795504252018205888",
"31987857423792478480956079306395824738844157868212",
"78012272432447109604518603674735717409512553185163",
"10624168974582694857068814980835460291211237957619",
"28233886480672822931253264819154143116743426326308",
"89623606602209081946363258303327638439587678867290",
"75122835462599446846355968875119286746907535989000",
"95915109530293413066965474109133708090087344454002",
"72940750727743990161064521933227954620508565265942",
"89934250959005831296561140765869261685995209072375",
"15791938856503924152004989486488652979138099816470",
"90309288081528948329684434757527870178354563234471",
"16400839880430134231704934958436252119664051847916",
"90130270861260063044843918647003373254528983002263",
"41017803545119756604745167778100153049406068988917",
"28313581553300933045530730315192091504374551157868",
"92798951941379955590514322738783346771892369848180",
"69376592011088188918895339807283313946366899180995",
"23461634006883578275459545599678986422956457867411",
"72973794455635547430019574153677416999940204998994",
"68392244439729144262721752115054862157329974862664",
"77208717224576467464465855049508159426216540657325",
"28495710144767280780681975005931343861868852999227",
"16514578382224831244744002523610045388004289570575",
"13892477864082619265394930928311067673283850561047",
"34119090262256541935513272374278222533360356526001",
"51819885327826823535190704691379135457663522077229",
"90657552453396645361046175071300002994182249765378",
"43988181775758175766915473299209570893913289990182",
"60582075184290931545039005389212827837544806834274",
"08879821536615921776494870510638754358239744870470",
"91135025131037525679147126867537230731708113072742",
"83072679733104272955888078156936565860641290967900",
"92660603394614768685279441991515899029419677387619",
"44286956393265025304324417117941080877061012470638",
"51221585659479998258711685377200190164403303081992",
"52049253514660146157707498617937506855070328452683",
"70507752392073141363431036683456418500669306205736",
"89820774858921250428812396204762091278487519828622",
"24567807174395799386212464147565818907483988929389",
"04053872570926194129092009009558498907683845225486",
"83771725912268882439794451020035382411462225324962",
"04633924575573022249217326291819417918920546501456",
"21955009292833905044736855789559032224182361526561",
"48071469772670344287594912857356117268455583137626",
"57011631522866371556086465291108745576871626939839",
"69652686218087361243846848101049434907943255294959",
"63251609751061042068229363913559487453338615919629",
"34995796487332919927928517788893697651892319280863",
"08943255036596619624810139509051435798737097971023",
"64695566021691149461073973043787142169933428987280",
"54887516348101276549185797854677461091724168380218",
"24423822402204401556738361156382739063402418514383",
"75537168224601582400243809953063927785578616689301",
"27481295791847563136254557976473221376515412609243",
"20449330182786554734299529835621123643118919008676",
"36770617542738712446819529514841438802495730129547",
"92092890056641714973967700960679306257031408083503",
"48149581122926465261575170598109793261137181522559",
"06115965029625411784288836518617645981726287547058",
"17524385194774845785677781683136032583483777176335",
"91791465094930330116808251249245540110372237590783",
"36845166866063837711881524190393651797912488396137",
"76525719876839596229047180898907078448461771891986",
"47892865742829513920457060053618591097952156052158",
"91036968236501814816463140715054337233239261122838",
"32256978819902796475322955664232758889827845195645",
"99208208390035117256254892771716252605350075048315",
"16989303365154600338972386664922991258732364361174",
"25925825561557559515187491979888507298759165436889",
"91445163950759486808159838138834063924583076393341",
"73656994296180724808132786163815816514422265138121",
"26232296295139317990557271851735539907039823964366",
"48001637015114745652547145224867806480184609154204",
"02986394889479752814917899608790452517350990574238",
"00231076767281649861304375271363142046063302094543",
"60381496598857295036982221439411539623525601187949",
"69039849797917655379899032367260549396274325690658",
"41374419882853231994165925337251906064553502570324",
"76757548008055194404834714164313669871426392367837",
"32566179139649850247048468773781646308183086514545",
"91437221505593390531228926095372940892388063377613",
"71418148917591519586101693856942201752897391828058",
"56969234232683863077701725788484322104677860179512",
"06135143230702541657590450924728067283753635586856",
"69234112805888796861845782105016945267506330317174",
"47994319942316582343816556859211756678702642639501",
"65631939853223293220905408925201452133086305728823",
"38325331699213800200751365176851915234952325743570",
"14101221005366078232545115664551421661730513806476",
"58181472430832948021134719322826872860022439178123",
"91971067138390232515026329536757474008913182496488",
"94135074686032158875907795795752377096692015135842",
"44130164830380645838491164760564147302737925278077",
"85533586813629589541976899185560373045365800141385",
"44227090758665531634003660416722897600027713067241",
"28118732646395052078351662278759845111811752514745",
"27057729162186311247044087962026784363816027773700",
"45501943077236991029987688281380379523574152367216",
"04766908984554504535560991430130639132915258226575",
"14008124436646449755913874174049422217427857061203",
"19092939009901518799331699073482176447206365116053",
"03519961445698286294967069624971604655822589243871",
"70361070889007101722338326119213769299766240721918",
"39854657791063869314689247749554841023182607292022",
"58098066292024905091395398295203129771017788802983",
"51947911469925091637531055199840047030511110891105",
"78807967026191425080345179500870359966490170266207",
"74762386072018940081993721973784127549608518363221",
"06500605575411996862895235585063984260192096369375",
"71678125429285727235298192810882720704015174924915",
"71901374619105491060584920547733762957493157400212",
"52897862578264065069508535998026980473800344207360",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000",
NULL
};
size_t i = 0;
while(f4096 != NULL)
{
printf("%s\n", f4096[i++]);
}
return 0;
}
 
M

mailursubbu

Richard Heathfield wrote:
What is the logic to fill the below structure ?
const char *f4096[] =
{
"36427363894570419315658274703116469205712449235098",
"55429950938484780378749358324138749113885226019241",
"40891623559751804416272059989050947403083905593144",
"60714086478086556387708301685874429122262002873651",
"83591438850774768282360528112152265779773669000034",
"86516084407006124804757734802670252003255573271909",
"40507040548909593911164433288212729920687676754028",
"78271433441391317409720563538261546971153120920710",
"48875123602717508202331490356780500479545365440905",
"61291694863670587872515754423200342792488252348768",
"80539531943288352982170364387459832260724861724010",
"73086432340778391528724436743763446801685568833263",
"73863958049769348649991349895178910490897544145740",
"97570875834634480771125630588623716189009401636330",
"53646993798805858616415177816195672825567716704614",
"58396978625340803923658485435690864317795307693130",
"10272016216402659916604261115195019689311226796093",
"94928458398078100113442228613143904163956274722899",
"43227918238117580143172943623664778882805483013877",
"51055640285035342062130461816606396865956896302866",
"41598194855461165121960746503127778591908645352536",
"97646914221190439078208345723015514900232490211449",
"66944530403016451141560850384057138717452521631810",
"12414117847330924157706064661223486314733327431651",
"55479655672025874105055481263874005459632091967813",
"52571571658969317043330854823715806016860179823992",
"10625094851407596769999413049147266421215221178538",
"84453970956864055502349087487927761994295569654129",
"30331971487034504772117133692421577264115179273885",
"90616237286137120137042922988454003047849833760673",
"01622317024839844784260626059272217449005535883839",
"21258299912148364498891628563102941971199975150288",
"19431794525437180923381816442983789306703885638574",
"34306504439572867011371635599296477673657497119956",
"82054809284310521932937494891771568624272238162872",
"54733997372828715556763095744254521708286724240555",
"01373389903877982683044205234420875335795288797702",
"18150336769594612314349050445194979784468837856037",
"91720709320311662885681041694000355495940965566640",
"02145950937081519805957187866300267500791409139510",
"55794293882106324205779318713291201688199480753754",
"91689564836729652295536675468060137806332182604573",
"63147094605620861296822434423389899483647144554802",
"37716740880472951168530145620726950237355341505901",
"23829829023175320390898489714616191079152500160148",
"31236238538654814899946923963025958868571594014445",
"82155015408964698160334009318202620174534575763136",
"58258905629556656958662497665454332919551038868983",
"26762989686539642896967252134101348149659861882396",
"07858972919059076369412947251180032927721883726329",
"49960664158503313136448068629511935929651312969971",
"13366140964904012852575902916612909808769287250462",
"80996708164986922648646620734335716897683511508102",
"37100749684914817871679652216950612271232355403134",
"08515421598762783465929494885178836710509866954865",
"72486600455157521345697653628462127962844098228042",
"10093887097271062618886280887810191956739547356974",
"73947722487596158018686154982482419695858939422024",
"90020988515906761786577989380382151269654391629331",
"64022458962606534189827026386527559579652045420753",
"08648066695506045939594976680223851292939673988282",
"72447772158072172866057547619930274646060607934092",
"48319488688259841640493639590264707610618381285762",
"38203270311047899093902373083298363898904195897388",
"27759364769203014280477447075616148243944428719763",
"96883082630843110487402814537646791228130895046515",
"04591439196427559223114960177985321750434628549932",
"13469300413367478759629810228589249461560060224804",
"45428436062909030983354170826460690411699726669245",
"49725975639611641864825702539295044199173815566428",
"04642286722196264401610509387389496007731450445478",
"60243262059035557928212018966452513951454067335909",
"37151664875034296947590438533439511479884543864865",
"20705893065917354488237509353475657229543651130522",
"62359425183149146515606586288552808594755228662940",
"13780232652246088796742744410487823989893404158496",
"39976263021898880679736762302016905616356289590740",
"46073991860219431450987628441036526644442153282467",
"67771938412481175164652554717274679537237769976583",
"82697151397099264203240716449940026958737060110100",
"84140358417913631534698206709614694213091003748850",
"51917475421991193515227483095060948624012247727494",
"99481753613258039658936687564769991984773935694839",
"83568588015568938889925410408979078954780434059273",
"78566892901025360707243230429385406619801104808343",
"12882195404514291670830967973936561148768866208270",
"72968211125333515167730503439910157885761326190575",
"88917857745748905303371752592099136703165151282333",
"10049449932334712803194849769028817663944754615259",
"91737720009115652978418284853009372535302633741167",
"22682295128167032344694730137174975142011502398045",
"56209240323006295602061664458780400581509997406910",
"18322106737571639250383698914898855184176622054522",
"42000145207860419586577722128862876236996653950204",
"96723830115480391994551202503486020032120253931623",
"36940063591684394080912559276424035181045592412927",
"62606479904975841448840597757301326350410559925209",
"04461822723252567291373469781792196782467522238808",
"84692517978816838410176242510866271824695293539565",
"62118710750276615251150565749892292784621212796020",
"01803697325110887398055343449473123184477950919915",
"64251268676423355849668266159481493700856673636672",
"62521228939127707568060145102197241026496075765556",
"76035558191889917718081720579548920072152611708737",
"26241172393763218260229718814603574218473998207157",
"08016704792784751622932020507878800446735727227557",
"66230741844849209817541724069809633609791870750786",
"41110772014094850639445341168955848573268729666007",
"20593460241199302470500751280099146054229040145877",
"50564251991992938797626582893936327791087446318118",
"25828634918818364668835053658683687739654870089250",
"79905315601292639732624951342568015746005679206926",
"18471418493445944375146033750884841549348593994504",
"03643927321803663661275933332699744411959049037476",
"38859509045882355160956272419918279149451849921959",
"06446378935767862196706569624537514165668859660007",
"97106011597388451804556408721378565160521434260807",
"65127676969519251260568362461233941968326661700780",
"75852381724481066265808253721633517527983579236919",
"11782400981004194131471737120941029047130452335046",
"01083536639416323032453223515113183634999810490717",
"82628193546061459233710571274139572290795063992479",
"30047442055291984569372722568090903922877600905502",
"00627556897111458883593743149047973551953559201787",
"39759927546350458771828839463699552111367253119999",
"29461773000875067305557158363491884187912686093334",
"00033481253670641439295406830971241961493932977812",
"45904845592744215464329978728696795504252018205888",
"31987857423792478480956079306395824738844157868212",
"78012272432447109604518603674735717409512553185163",
"10624168974582694857068814980835460291211237957619",
"28233886480672822931253264819154143116743426326308",
"89623606602209081946363258303327638439587678867290",
"75122835462599446846355968875119286746907535989000",
"95915109530293413066965474109133708090087344454002",
"72940750727743990161064521933227954620508565265942",
"89934250959005831296561140765869261685995209072375",
"15791938856503924152004989486488652979138099816470",
"90309288081528948329684434757527870178354563234471",
"16400839880430134231704934958436252119664051847916",
"90130270861260063044843918647003373254528983002263",
"41017803545119756604745167778100153049406068988917",
"28313581553300933045530730315192091504374551157868",
"92798951941379955590514322738783346771892369848180",
"69376592011088188918895339807283313946366899180995",
"23461634006883578275459545599678986422956457867411",
"72973794455635547430019574153677416999940204998994",
"68392244439729144262721752115054862157329974862664",
"77208717224576467464465855049508159426216540657325",
"28495710144767280780681975005931343861868852999227",
"16514578382224831244744002523610045388004289570575",
"13892477864082619265394930928311067673283850561047",
"34119090262256541935513272374278222533360356526001",
"51819885327826823535190704691379135457663522077229",
"90657552453396645361046175071300002994182249765378",
"43988181775758175766915473299209570893913289990182",
"60582075184290931545039005389212827837544806834274",
"08879821536615921776494870510638754358239744870470",
"91135025131037525679147126867537230731708113072742",
"83072679733104272955888078156936565860641290967900",
"92660603394614768685279441991515899029419677387619",
"44286956393265025304324417117941080877061012470638",
"51221585659479998258711685377200190164403303081992",
"52049253514660146157707498617937506855070328452683",
"70507752392073141363431036683456418500669306205736",
"89820774858921250428812396204762091278487519828622",
"24567807174395799386212464147565818907483988929389",
"04053872570926194129092009009558498907683845225486",
"83771725912268882439794451020035382411462225324962",
"04633924575573022249217326291819417918920546501456",
"21955009292833905044736855789559032224182361526561",
"48071469772670344287594912857356117268455583137626",
"57011631522866371556086465291108745576871626939839",
"69652686218087361243846848101049434907943255294959",
"63251609751061042068229363913559487453338615919629",
"34995796487332919927928517788893697651892319280863",
"08943255036596619624810139509051435798737097971023",
"64695566021691149461073973043787142169933428987280",
"54887516348101276549185797854677461091724168380218",
"24423822402204401556738361156382739063402418514383",
"75537168224601582400243809953063927785578616689301",
"27481295791847563136254557976473221376515412609243",
"20449330182786554734299529835621123643118919008676",
"36770617542738712446819529514841438802495730129547",
"92092890056641714973967700960679306257031408083503",
"48149581122926465261575170598109793261137181522559",
"06115965029625411784288836518617645981726287547058",
"17524385194774845785677781683136032583483777176335",
"91791465094930330116808251249245540110372237590783",
"36845166866063837711881524190393651797912488396137",
"76525719876839596229047180898907078448461771891986",
"47892865742829513920457060053618591097952156052158",
"91036968236501814816463140715054337233239261122838",
"32256978819902796475322955664232758889827845195645",
"99208208390035117256254892771716252605350075048315",
"16989303365154600338972386664922991258732364361174",
"25925825561557559515187491979888507298759165436889",
"91445163950759486808159838138834063924583076393341",
"73656994296180724808132786163815816514422265138121",
"26232296295139317990557271851735539907039823964366",
"48001637015114745652547145224867806480184609154204",
"02986394889479752814917899608790452517350990574238",
"00231076767281649861304375271363142046063302094543",
"60381496598857295036982221439411539623525601187949",
"69039849797917655379899032367260549396274325690658",
"41374419882853231994165925337251906064553502570324",
"76757548008055194404834714164313669871426392367837",
"32566179139649850247048468773781646308183086514545",
"91437221505593390531228926095372940892388063377613",
"71418148917591519586101693856942201752897391828058",
"56969234232683863077701725788484322104677860179512",
"06135143230702541657590450924728067283753635586856",
"69234112805888796861845782105016945267506330317174",
"47994319942316582343816556859211756678702642639501",
"65631939853223293220905408925201452133086305728823",
"38325331699213800200751365176851915234952325743570",
"14101221005366078232545115664551421661730513806476",
"58181472430832948021134719322826872860022439178123",
"91971067138390232515026329536757474008913182496488",
"94135074686032158875907795795752377096692015135842",
"44130164830380645838491164760564147302737925278077",
"85533586813629589541976899185560373045365800141385",
"44227090758665531634003660416722897600027713067241",
"28118732646395052078351662278759845111811752514745",
"27057729162186311247044087962026784363816027773700",
"45501943077236991029987688281380379523574152367216",
"04766908984554504535560991430130639132915258226575",
"14008124436646449755913874174049422217427857061203",
"19092939009901518799331699073482176447206365116053",
"03519961445698286294967069624971604655822589243871",
"70361070889007101722338326119213769299766240721918",
"39854657791063869314689247749554841023182607292022",
"58098066292024905091395398295203129771017788802983",
"51947911469925091637531055199840047030511110891105",
"78807967026191425080345179500870359966490170266207",
"74762386072018940081993721973784127549608518363221",
"06500605575411996862895235585063984260192096369375",
"71678125429285727235298192810882720704015174924915",
"71901374619105491060584920547733762957493157400212",
"52897862578264065069508535998026980473800344207360",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000",
NULL
};
size_t i = 0;
while(f4096 != NULL)
{
printf("%s\n", f4096[i++]);
}
return 0;
}

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
 
M

mailursubbu

Richard Heathfield wrote:
What is the logic to fill the below array?
const char *f4096[] =
{
"36427363894570419315658274703116469205712449235098",
"55429950938484780378749358324138749113885226019241",
"40891623559751804416272059989050947403083905593144",
"60714086478086556387708301685874429122262002873651",
"83591438850774768282360528112152265779773669000034",
"86516084407006124804757734802670252003255573271909",
"40507040548909593911164433288212729920687676754028",
"78271433441391317409720563538261546971153120920710",
"48875123602717508202331490356780500479545365440905",
"61291694863670587872515754423200342792488252348768",
"80539531943288352982170364387459832260724861724010",
"73086432340778391528724436743763446801685568833263",
"73863958049769348649991349895178910490897544145740",
"97570875834634480771125630588623716189009401636330",
"53646993798805858616415177816195672825567716704614",
"58396978625340803923658485435690864317795307693130",
"10272016216402659916604261115195019689311226796093",
"94928458398078100113442228613143904163956274722899",
"43227918238117580143172943623664778882805483013877",
"51055640285035342062130461816606396865956896302866",
"41598194855461165121960746503127778591908645352536",
"97646914221190439078208345723015514900232490211449",
"66944530403016451141560850384057138717452521631810",
"12414117847330924157706064661223486314733327431651",
"55479655672025874105055481263874005459632091967813",
"52571571658969317043330854823715806016860179823992",
"10625094851407596769999413049147266421215221178538",
"84453970956864055502349087487927761994295569654129",
"30331971487034504772117133692421577264115179273885",
"90616237286137120137042922988454003047849833760673",
"01622317024839844784260626059272217449005535883839",
"21258299912148364498891628563102941971199975150288",
"19431794525437180923381816442983789306703885638574",
"34306504439572867011371635599296477673657497119956",
"82054809284310521932937494891771568624272238162872",
"54733997372828715556763095744254521708286724240555",
"01373389903877982683044205234420875335795288797702",
"18150336769594612314349050445194979784468837856037",
"91720709320311662885681041694000355495940965566640",
"02145950937081519805957187866300267500791409139510",
"55794293882106324205779318713291201688199480753754",
"91689564836729652295536675468060137806332182604573",
"63147094605620861296822434423389899483647144554802",
"37716740880472951168530145620726950237355341505901",
"23829829023175320390898489714616191079152500160148",
"31236238538654814899946923963025958868571594014445",
"82155015408964698160334009318202620174534575763136",
"58258905629556656958662497665454332919551038868983",
"26762989686539642896967252134101348149659861882396",
"07858972919059076369412947251180032927721883726329",
"49960664158503313136448068629511935929651312969971",
"13366140964904012852575902916612909808769287250462",
"80996708164986922648646620734335716897683511508102",
"37100749684914817871679652216950612271232355403134",
"08515421598762783465929494885178836710509866954865",
"72486600455157521345697653628462127962844098228042",
"10093887097271062618886280887810191956739547356974",
"73947722487596158018686154982482419695858939422024",
"90020988515906761786577989380382151269654391629331",
"64022458962606534189827026386527559579652045420753",
"08648066695506045939594976680223851292939673988282",
"72447772158072172866057547619930274646060607934092",
"48319488688259841640493639590264707610618381285762",
"38203270311047899093902373083298363898904195897388",
"27759364769203014280477447075616148243944428719763",
"96883082630843110487402814537646791228130895046515",
"04591439196427559223114960177985321750434628549932",
"13469300413367478759629810228589249461560060224804",
"45428436062909030983354170826460690411699726669245",
"49725975639611641864825702539295044199173815566428",
"04642286722196264401610509387389496007731450445478",
"60243262059035557928212018966452513951454067335909",
"37151664875034296947590438533439511479884543864865",
"20705893065917354488237509353475657229543651130522",
"62359425183149146515606586288552808594755228662940",
"13780232652246088796742744410487823989893404158496",
"39976263021898880679736762302016905616356289590740",
"46073991860219431450987628441036526644442153282467",
"67771938412481175164652554717274679537237769976583",
"82697151397099264203240716449940026958737060110100",
"84140358417913631534698206709614694213091003748850",
"51917475421991193515227483095060948624012247727494",
"99481753613258039658936687564769991984773935694839",
"83568588015568938889925410408979078954780434059273",
"78566892901025360707243230429385406619801104808343",
"12882195404514291670830967973936561148768866208270",
"72968211125333515167730503439910157885761326190575",
"88917857745748905303371752592099136703165151282333",
"10049449932334712803194849769028817663944754615259",
"91737720009115652978418284853009372535302633741167",
"22682295128167032344694730137174975142011502398045",
"56209240323006295602061664458780400581509997406910",
"18322106737571639250383698914898855184176622054522",
"42000145207860419586577722128862876236996653950204",
"96723830115480391994551202503486020032120253931623",
"36940063591684394080912559276424035181045592412927",
"62606479904975841448840597757301326350410559925209",
"04461822723252567291373469781792196782467522238808",
"84692517978816838410176242510866271824695293539565",
"62118710750276615251150565749892292784621212796020",
"01803697325110887398055343449473123184477950919915",
"64251268676423355849668266159481493700856673636672",
"62521228939127707568060145102197241026496075765556",
"76035558191889917718081720579548920072152611708737",
"26241172393763218260229718814603574218473998207157",
"08016704792784751622932020507878800446735727227557",
"66230741844849209817541724069809633609791870750786",
"41110772014094850639445341168955848573268729666007",
"20593460241199302470500751280099146054229040145877",
"50564251991992938797626582893936327791087446318118",
"25828634918818364668835053658683687739654870089250",
"79905315601292639732624951342568015746005679206926",
"18471418493445944375146033750884841549348593994504",
"03643927321803663661275933332699744411959049037476",
"38859509045882355160956272419918279149451849921959",
"06446378935767862196706569624537514165668859660007",
"97106011597388451804556408721378565160521434260807",
"65127676969519251260568362461233941968326661700780",
"75852381724481066265808253721633517527983579236919",
"11782400981004194131471737120941029047130452335046",
"01083536639416323032453223515113183634999810490717",
"82628193546061459233710571274139572290795063992479",
"30047442055291984569372722568090903922877600905502",
"00627556897111458883593743149047973551953559201787",
"39759927546350458771828839463699552111367253119999",
"29461773000875067305557158363491884187912686093334",
"00033481253670641439295406830971241961493932977812",
"45904845592744215464329978728696795504252018205888",
"31987857423792478480956079306395824738844157868212",
"78012272432447109604518603674735717409512553185163",
"10624168974582694857068814980835460291211237957619",
"28233886480672822931253264819154143116743426326308",
"89623606602209081946363258303327638439587678867290",
"75122835462599446846355968875119286746907535989000",
"95915109530293413066965474109133708090087344454002",
"72940750727743990161064521933227954620508565265942",
"89934250959005831296561140765869261685995209072375",
"15791938856503924152004989486488652979138099816470",
"90309288081528948329684434757527870178354563234471",
"16400839880430134231704934958436252119664051847916",
"90130270861260063044843918647003373254528983002263",
"41017803545119756604745167778100153049406068988917",
"28313581553300933045530730315192091504374551157868",
"92798951941379955590514322738783346771892369848180",
"69376592011088188918895339807283313946366899180995",
"23461634006883578275459545599678986422956457867411",
"72973794455635547430019574153677416999940204998994",
"68392244439729144262721752115054862157329974862664",
"77208717224576467464465855049508159426216540657325",
"28495710144767280780681975005931343861868852999227",
"16514578382224831244744002523610045388004289570575",
"13892477864082619265394930928311067673283850561047",
"34119090262256541935513272374278222533360356526001",
"51819885327826823535190704691379135457663522077229",
"90657552453396645361046175071300002994182249765378",
"43988181775758175766915473299209570893913289990182",
"60582075184290931545039005389212827837544806834274",
"08879821536615921776494870510638754358239744870470",
"91135025131037525679147126867537230731708113072742",
"83072679733104272955888078156936565860641290967900",
"92660603394614768685279441991515899029419677387619",
"44286956393265025304324417117941080877061012470638",
"51221585659479998258711685377200190164403303081992",
"52049253514660146157707498617937506855070328452683",
"70507752392073141363431036683456418500669306205736",
"89820774858921250428812396204762091278487519828622",
"24567807174395799386212464147565818907483988929389",
"04053872570926194129092009009558498907683845225486",
"83771725912268882439794451020035382411462225324962",
"04633924575573022249217326291819417918920546501456",
"21955009292833905044736855789559032224182361526561",
"48071469772670344287594912857356117268455583137626",
"57011631522866371556086465291108745576871626939839",
"69652686218087361243846848101049434907943255294959",
"63251609751061042068229363913559487453338615919629",
"34995796487332919927928517788893697651892319280863",
"08943255036596619624810139509051435798737097971023",
"64695566021691149461073973043787142169933428987280",
"54887516348101276549185797854677461091724168380218",
"24423822402204401556738361156382739063402418514383",
"75537168224601582400243809953063927785578616689301",
"27481295791847563136254557976473221376515412609243",
"20449330182786554734299529835621123643118919008676",
"36770617542738712446819529514841438802495730129547",
"92092890056641714973967700960679306257031408083503",
"48149581122926465261575170598109793261137181522559",
"06115965029625411784288836518617645981726287547058",
"17524385194774845785677781683136032583483777176335",
"91791465094930330116808251249245540110372237590783",
"36845166866063837711881524190393651797912488396137",
"76525719876839596229047180898907078448461771891986",
"47892865742829513920457060053618591097952156052158",
"91036968236501814816463140715054337233239261122838",
"32256978819902796475322955664232758889827845195645",
"99208208390035117256254892771716252605350075048315",
"16989303365154600338972386664922991258732364361174",
"25925825561557559515187491979888507298759165436889",
"91445163950759486808159838138834063924583076393341",
"73656994296180724808132786163815816514422265138121",
"26232296295139317990557271851735539907039823964366",
"48001637015114745652547145224867806480184609154204",
"02986394889479752814917899608790452517350990574238",
"00231076767281649861304375271363142046063302094543",
"60381496598857295036982221439411539623525601187949",
"69039849797917655379899032367260549396274325690658",
"41374419882853231994165925337251906064553502570324",
"76757548008055194404834714164313669871426392367837",
"32566179139649850247048468773781646308183086514545",
"91437221505593390531228926095372940892388063377613",
"71418148917591519586101693856942201752897391828058",
"56969234232683863077701725788484322104677860179512",
"06135143230702541657590450924728067283753635586856",
"69234112805888796861845782105016945267506330317174",
"47994319942316582343816556859211756678702642639501",
"65631939853223293220905408925201452133086305728823",
"38325331699213800200751365176851915234952325743570",
"14101221005366078232545115664551421661730513806476",
"58181472430832948021134719322826872860022439178123",
"91971067138390232515026329536757474008913182496488",
"94135074686032158875907795795752377096692015135842",
"44130164830380645838491164760564147302737925278077",
"85533586813629589541976899185560373045365800141385",
"44227090758665531634003660416722897600027713067241",
"28118732646395052078351662278759845111811752514745",
"27057729162186311247044087962026784363816027773700",
"45501943077236991029987688281380379523574152367216",
"04766908984554504535560991430130639132915258226575",
"14008124436646449755913874174049422217427857061203",
"19092939009901518799331699073482176447206365116053",
"03519961445698286294967069624971604655822589243871",
"70361070889007101722338326119213769299766240721918",
"39854657791063869314689247749554841023182607292022",
"58098066292024905091395398295203129771017788802983",
"51947911469925091637531055199840047030511110891105",
"78807967026191425080345179500870359966490170266207",
"74762386072018940081993721973784127549608518363221",
"06500605575411996862895235585063984260192096369375",
"71678125429285727235298192810882720704015174924915",
"71901374619105491060584920547733762957493157400212",
"52897862578264065069508535998026980473800344207360",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000",
"00000000000000000000",
NULL
};
size_t i = 0;
while(f4096 != NULL)
{
printf("%s\n", f4096[i++]);
}
return 0;
}

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
 
R

Richard Heathfield

(e-mail address removed) said:
What is the logic to fill the below structure ?
const char *f4096[] =
{
"36427363894570419315658274703116469205712449235098",
"55429950938484780378749358324138749113885226019241",
"40891623559751804416272059989050947403083905593144",

[...]

Well, I started off by calculating 4096!, and storing that result in a file.
I then wrote the following program, feeding it that file as input:

#include <stdio.h>

int main(void)
{
int i = 0;
int ch = 0;
printf("#include <stdio.h>\n\n");
printf("int main(void)\n{\n");
printf(" const char *f4096[] =\n");
printf(" {\n");
printf(" \"");
while((ch = getc(stdin)) != EOF)
{
if(isdigit(ch))
{
putchar(ch);
++i;
if(i == 50)
{
printf("\",\n \"");
i = 0;
}
}
}
printf("\",\n NULL\n");
printf(" };\n");
printf(" size_t i = 0;\n");
printf(" while(f4096 != NULL)\n");
printf(" {\n");
printf(" printf(\"%%s\\n\", f4096[i++]);\n");
printf(" }\n");
printf(" return 0;\n");
printf("}\n");
return 0;
}

....with the result you have already seen.
 
M

mailursubbu

How did you calculated 4096!. My calc failed and even my program !!
Richard said:
(e-mail address removed) said:
What is the logic to fill the below structure ?
const char *f4096[] =
{
"36427363894570419315658274703116469205712449235098",
"55429950938484780378749358324138749113885226019241",
"40891623559751804416272059989050947403083905593144",

[...]

Well, I started off by calculating 4096!, and storing that result in a file.
I then wrote the following program, feeding it that file as input:

#include <stdio.h>

int main(void)
{
int i = 0;
int ch = 0;
printf("#include <stdio.h>\n\n");
printf("int main(void)\n{\n");
printf(" const char *f4096[] =\n");
printf(" {\n");
printf(" \"");
while((ch = getc(stdin)) != EOF)
{
if(isdigit(ch))
{
putchar(ch);
++i;
if(i == 50)
{
printf("\",\n \"");
i = 0;
}
}
}
printf("\",\n NULL\n");
printf(" };\n");
printf(" size_t i = 0;\n");
printf(" while(f4096 != NULL)\n");
printf(" {\n");
printf(" printf(\"%%s\\n\", f4096[i++]);\n");
printf(" }\n");
printf(" return 0;\n");
printf("}\n");
return 0;
}

...with the result you have already seen.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
 
R

Richard Heathfield

(e-mail address removed) said:
How did you calculated 4096!. My calc failed and even my program !!

Aha! Some evidence that you've had a go yourself. Let's see your program,
and maybe we can help you fix it.
 
M

mailursubbu

Hi Richard,


I started with the below kind of program which is not working because
of memory overflow.

long long fact(long long n)
{
return n*fact(n-1);
}
int main()
{
printf("%ld",fact(4096));
}

Now I am planning to write the linked list version of addition().
Which inturn will be used by the multiplication(). That inturn by the
fact(). Is these unlimited size data types are already there ?
 
R

Richard Heathfield

(e-mail address removed) said:
Hi Richard,


I started with the below kind of program which is not working because
of memory overflow.

long long fact(long long n)
{
return n*fact(n-1);
}

That's a good example of why you should avoid recursive functions until you
know how to make them stop! Better would be:

unsigned long long fact(unsigned int n)
{
unsigned long long f = 1;
while(n)
{
f *= n--;
}
return f;
}

Note that if n is 20, n! is 2432902008176640000 - and that's the highest
factorial value you can *guarantee* to store in an unsigned long long int.

int main()
{
printf("%ld",fact(4096));

Look up the format specifiers for long long int and unsigned long long int
when you get a minute. %ld is for long int, not long long int.
Now I am planning to write the linked list version of addition().
Which inturn will be used by the multiplication(). That inturn by the
fact(). Is these unlimited size data types are already there ?

Well, I think a linked list is probably a bad idea, since it denies you
random access to the data.

Personally, I use an array of unsigned char - dynamically allocated - to
store a large number's magnitude, and a separate int value to record
whether it's positive or negative. I store the current magnitude of the
number, too, which I find helpful - and also I track the amount of memory
currently allocated for the array, so that I know when I need to resize.

I use base 256 for my calculations, but you might prefer to keep everything
representable in text format ('0', '1', '2', etc) for your first go.
 
?

=?ISO-8859-1?Q?=22Nils_O=2E_Sel=E5sdal=22?=

Hi Richard,


I started with the below kind of program which is not working because
of memory overflow.

long long fact(long long n)
{
return n*fact(n-1);
}
int main()
{
printf("%ld",fact(4096));
}

Now I am planning to write the linked list version of addition().
Which inturn will be used by the multiplication(). That inturn by the
fact(). Is these unlimited size data types are already there ?

A recursive function should have a stop condition ensuring it
terminates.
In this case you want to stop when n reaches 0.
long long fact(long long n)
{
if(n == 0) /* 0! is 1*/
return 1;
else
return n*fact(n-1); /* n! is n*(n -1)! */
}

Rewriting the function to be iterative is likely a better choice.

However, a long long type might not be able to hold a value big enough
to represent the factorial of big numbers. You might resort to doing
all the math yourself (atleast subtraction and multiplication) e.g. in
a similar fashion as you'd do the math on paper. You could use a
postitional numbering system built up from primititive C types, e.g.
an array of ints.
There are libriaries available for various systems doing the math
for you though, generally referred to as bignum libraries.
 
R

Richard Tobin

I started with the below kind of program which is not working because
of memory overflow.

long long fact(long long n)
{
return n*fact(n-1);
}
int main()
{
printf("%ld",fact(4096));
}

So what happened when you tried to compute 3! with it?

-- Richard
 
C

Chris Dollin

(e-mail address removed) wrote:

(please don't top-post)
I started with the below kind of program which is not working because
of memory overflow.

long long fact(long long n)
{
return n*fact(n-1);
}

A good starting test case is to check that your code computes
1! = 1 correctly.
int main()
{
printf("%ld",fact(4096));
}

Now I am planning to write the linked list version of addition().

Factorial doesn't /need/ addition.
Which inturn will be used by the multiplication().

And in this case, it doesn't need fully general multiplication either.
That inturn by the
fact().
Is these unlimited size data types are already there ?

There are libraries out there that do unbounded-precision arithmetic,
yes.

But what you can manage with is code that can multiply an
unbounded-precision number by an int. (And something to
print such an int out - which you can hack by working in
base 10, or better 10000.).
 
R

Richard Heathfield

Chris Dollin said:

A good starting test case is to check that your code computes
1! = 1 correctly.

Why not start with 0! = 1 ?

Factorial doesn't /need/ addition.

It does need subtraction, though.

There are libraries out there that do unbounded-precision arithmetic,
yes.

No, there aren't, for any reasonable definition of "unbounded".
 
C

CBFalconer

*** top-posting fixed ***
I started with the below kind of program which is not working
because of memory overflow. .... snip ...

Now I am planning to write the linked list version of addition().
Which inturn will be used by the multiplication(). That inturn by
the fact(). Is these unlimited size data types are already there ?

Don't top-post, or you will get no help here. See the links
below. Your answer belong after, or intermixed with, the SNIPPED
quoted material.

--
Some informative links:
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html
 
K

Keith Thompson

Richard Heathfield said:
Chris Dollin said: [...]
There are libraries out there that do unbounded-precision arithmetic,
yes.

No, there aren't, for any reasonable definition of "unbounded".

There are libraries that do arithmetic on quantities whose magnitude
is limited only by available memory.

I won't claim that that's a reasonable definition of "unbounded", but
it's good enough for many applications that don't *really* need
unbounded magnitudes.
 
J

jacob navia

Keith Thompson a écrit :
Richard Heathfield said:
Chris Dollin said:
[...]
There are libraries out there that do unbounded-precision arithmetic,
yes.

No, there aren't, for any reasonable definition of "unbounded".


There are libraries that do arithmetic on quantities whose magnitude
is limited only by available memory.

I won't claim that that's a reasonable definition of "unbounded", but
it's good enough for many applications that don't *really* need
unbounded magnitudes.

Using a relatively small amount of memory for the numbers
in a PC, i.e. 1GB numbers. Supposing 8GB main RAM,
and 16GB swap that would work. You would hold
up to 3 or 4 numbers in core RAM, enough for the
four operations and some intermeidate storage.

We have then numbers of :

1 073 741 824 bytes, i.e. 8 589 934 592 bits.

Dividing by 3 this means (in decimal) numbers of
2 863 311 530 digits, what could be enough for
many applications.

:)


In a more reasonable realm, 1MB numbers hold 8 388 608
bits or 2 796 202 decimal digits. With a run of the mill
PC with 1GB RAM we can hold several of those numbers
in RAM. No problems!

Not unbounded of course, but the bounds are fairly large
 
R

Richard Heathfield

Keith Thompson said:
Richard Heathfield said:
Chris Dollin said: [...]
There are libraries out there that do unbounded-precision arithmetic,
yes.

No, there aren't, for any reasonable definition of "unbounded".

There are libraries that do arithmetic on quantities whose magnitude
is limited only by available memory.

Et viola, monsieur, une bound! :)
I won't claim that that's a reasonable definition of "unbounded", but
it's good enough for many applications that don't *really* need
unbounded magnitudes.

Sure. Just being my usual nittypicky self.
 
T

T.M. Sommers

How to write a program to get the factorial of 4096.
I am working on a Linux m/c.

OT, but you might want to look at the gamma function, depending
on your application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top