Hi,
What is the equivalent of the java.Lang.Long in Squeak? Is there any method that returns the maximum/minimum value a long can have?
Cheers,
Houssam
____
"Le paradis touche les pieds des mères..."
What do you want to do? Usually, when doing integer arithmetic, you don't really need to be concerned with the data type, they're converted as necessary...
On 6/28/05, Houssam Fakih fakih@ensm-douai.fr wrote:
Hi,
What is the equivalent of the java.Lang.Long in Squeak? Is there any method that returns the maximum/minimum value a long can have?
Cheers,
Houssam
"Le paradis touche les pieds des mères..."
What do you want to do? Usually, when doing integer arithmetic, you don't really need to be concerned with the data type, they're converted as necessary...
I'm trying to import some benchmark tests written in Java. My aim is to compare the performances of a framework I develop and those of the same framework already developed in Java.
Cheers, Houssam ____ "Le paradis touche les pieds des mères..."
On 6/28/05, Houssam Fakih fakih@ensm-douai.fr wrote:
Hi,
What is the equivalent of the java.Lang.Long in Squeak? Is there any
method
that returns the maximum/minimum value a long can have?
Cheers,
Houssam
"Le paradis touche les pieds des mères..."
Houssam,
Smalltalk provides infinite precision for integers, forget Java and its restricted types.
Noury Le 28 juin 05, à 15:35, Houssam Fakih a écrit :
What do you want to do? Usually, when doing integer arithmetic, you don't really need to be concerned with the data type, they're converted as necessary...
I'm trying to import some benchmark tests written in Java. My aim is to compare the performances of a framework I develop and those of the same framework already developed in Java.
Cheers, Houssam ____ "Le paradis touche les pieds des mères..."
On 6/28/05, Houssam Fakih fakih@ensm-douai.fr wrote:
Hi,
What is the equivalent of the java.Lang.Long in Squeak? Is there any
method
that returns the maximum/minimum value a long can have?
Cheers,
Houssam
"Le paradis touche les pieds des mères..."
-------------------------------------------------------------- Dr. Noury Bouraqadi - Enseignant/Chercheur Ecole des Mines de Douai - Dept. G.I.P http://csl.ensm-douai.fr/noury
European Smalltalk Users Group Board http://www.esug.org
Squeak: an Open Source Smalltalk http://www.squeak.org --------------------------------------------------------------
On 28-Jun-05, at PM 05:40, Houssam Fakih wrote:
Hi,
What is the equivalent of the java.Lang.Long in Squeak? Is there any method that returns the maximum/minimum value a long can have?
If I'm right in thinking what you must be thinking, I think you should try printing the following in the workspace :)
========== 100 factorial "Print it" ==========
-- HweeBoon http://motionobj.com/blog/
"Houssam Fakih" fakih@ensm-douai.fr wrote:
What is the equivalent of the java.Lang.Long in Squeak? Is there any method that returns the maximum/minimum value a long can have?
I've no idea about the java stuff - never actually read any so far - but in Smalltalk a LargePositiveInteger can be very, very, very large. The only real limitation is your memory size though practical considerations and patience would stop you long before then. Certainly it is easy to do things like 7000 factorial As I pointed out in a mail on april 27th, ...
It will take a while, but nearly all the time is taken by the printing part. It's a 900+ byte LPI with 23878 digit decimal value
So imagine how big a value it would take to require a still modest LPI of 10kb or even 100kb. How about :
98042223754116799611009075299608014351170666061473227900987641366528629441544642 56080983665770186000361070419004259135563685874868349888953525745151327412899457 65836485747394697877781247612678926322187641375281270664774250962924976945428949 70895849959997876868095911836062990028482807891005485220495289334210551211525210 06991395033746873212029591308040381512043880728990203387115453630333204055076769 90559504724070727557086085569189227547721301799477890567991525234552785710610093 81585009316999344634646057000601493477122538844514343171522704580470729171914268 38641753311601125442678962674311698916033262079455150433283653899176289187604524 08745064273746396471674945963157651479494662456535480523519164391162607414521942 58246976901107319788946053283269395971423512356217355540424972261549594488322622 74979828662110875041254142033909687474157226234793691266845833942644345969881185 91383986766988918268704719207558632894001110080098220870953968817495528202203531 09720383092732333281267188217823994007063123623181763865530064421883509742229048 72834212023976241943889702212691403574697966221696564481949250112055386344459684 14347006638633107279800022106321559827406117207481528802171759440101733645458875 74790536009472993699313699266005069218294628782810605211500240061679746133080810 20388190808454572450439984443148606504802010954120931106618996966809489347075893 55533442840253297682954756721867104706545728005742041110893731628378278027397855 71070236795919804210116163728385863180272318847676564676412351987177418145539842 76313618497107786359592813896595996101194296269972675918566762288683277452428206 13463951638690912511987357394894810519850946958788443263181546621160806558213387 58325895688256970197610350142519905339594520983965178790924016547292386669212376 76724641753636911918722371112897642425175706829544024520071176134424180554090953 44230121058167643305880375142810267866960274975948314606342323396240578468824224 95043804828419779810665763649771364882326437658723799349666932056031246815116137 77323940255048598608058609563880200858569641410724715255440994524204933135862552 79608017143549157926781160719359108507909361475716039242479877105277896285153021 68862344683383104452447518336056591682434130323568283188697257143765724216523338 25750406965871240368570691183218731946265735942131320387632623964462296236488823 84932361829936524907897358047783760945910090452105811639691694020905333564776100 38360619772828628850149252199973575035365144400264594723775922142891914831777237 10878044817519429483923684364604424026359208346186382337935495401653573000924422 74959586121490441216673786539063065994105300248062053550737198826695659431541049 93148766550577873183739631640974770277407107026127850127719955710771377277353293 41351855305079148105174835287453466928182505951869677271651839054977087027230309 38687525235712974656690771248855620124886107267528024882157100543915014580216174 64102352231382075941911356491189565082499425853948811093188963101814932933323787 58486410905025469897042126866096660363437000782857834425181055745921753196581209 04594981145136246752473085338785283734074115751227654298902460127897775484824561 35496862846990849777262489021721375015427986860370664219074121929926800740525895 16192297578960094145439991700848265606054171266433001050771846861902947863074039 94795138046136863639042516344129668442966577842447218183707094240017088823724586 50666819720323306755429220783989742754621198239020791319064172774410027822055225 00865924543232468246641503782306733878701646755096722930646132768439356926856082 77566983011457192584564388994332831742164874319584607122632655679059872560997432 87493029423077667325822116442932696451482066941843202740544303027807978383007641 45119148913412749581545157896241268513115438408514996079698708889689572947020723 64256686359209199238305401263349438859167352784960204393174662623772448385938757 78923960293182891841873090229598321065510576078119030015237475047463687820414557 33986825582626079990821349194777706258931344262698908373367449673149061194273886 08015904597069430126036547972299743864513096924027688390310913576576572024390972 47174449483093998644620051817592954057843855225890888974854380048081888125985848 34956803355076631181843619899134418197364090338200590771623130282188460374371657 80698745570686271755641196769935704175995536004751688318349115120407584511888593 30894869944866877374103482953997386532788610724675433842866955238194178498560049 35003640579170223367247147581215834568070427706428748430347505605823119789858451 40858384877229099310331158776349172416462212930946614963354658341433493723808757 29066494019905040284374265629092117300184582873836765896856314145276529680254411 29900321495173416524397519265570231461996653600369069334324256559582404732874896 99904536234831415854161292915700671159165921381646234031214132717863513423466635 73516902430254002354503821404550992826624971363195446993238349930403652432960739 08730667027213669280996437994351541308722181278814245100277359382475685506171790 42292712932546657748869286145052330047664451817194421726250173123579428706514859 46565604607938083123694644222016917159985817184727694696680900826491471687777340 77617152479706776570610953717718337461949612527644960317326027192864392532226576 43202486598662298691595217818842705501830238805077160550207841575808416680888822 31437120765856592693539251958663379175886735133867778833137881368263181695310159 35562781096919584590522911645127792645753513442902803487041029167606301474920481 10910453968042120120647858094680687921521757326562780906079191477522392536596897 06944886067085774878948519470928867362800179203309625822306285565516062187737232 07206202127370499011564608446875123715630045518978614717927436624996997907693764 75044461078816061988323092010065270190433195654815926655159920153742071609876650 67525727309076817397803748750005388976935353627804735218054406753073557767267095 60840264284421615306785672187813829973101935505967366626186682853289446518499685 84069589306557725948493337459314151293560089733740953480836642590235015594180390 44067878541405812959290249787713598989115499497577669028856045110123360806601783 80716653120251482502653813091253391144610055484395266215735132828463789734406741 15385201021075294128277026690808748272809527267101724177822972025487293349214161 31855005272841849636139635888070416554238097430525299427973110831560125313681571 52732591374135397409905733766299940502591360176686136303134179789671625431763806 55446156806311709834672320471070610219668254787636861296894823452967089762710788 90243265169328248566781797918681108746860640664206983127990105756823683541429033 61569050519433693045215676042615054768602464333751554017251788934662179439126215 52157533684453257087953722524440345348573116000989586568269465358179221009379416 48747310449546972967905190229214685227460574433571395958040768338142057019209453 42776055611291036220920784234370476665520347828952404161764742036829567478871724 05519259788000572635370542188786805148044844427365723109674572713326606375813950 71814615811580870771918947416090552885239215957276338602637804355530807932234138 86052879409193956444086042604141506817082953900930742897196162429274488378510755 15707344338862598730175806318323157923446971816940410615759444534425458506803961 24393131351751528161300817375856517638961852467653741313393550845761878896775232 01970642281885868307386297106507175134331570665960341271194534126913246523191624 58144045062257902606552623122904916786432907182937500029668124301937325301321332 57840269179899050481597915730647641006015457297351078430834639573327519995607937 55414600065052853867581743406639113018248644933668277814786548651804384204995428 48076830128027664175893599334820809954914367900719059685159636412410791743986095 65644095533600759059187139372868582882801939056277156234061912714975340953761265 06872739387763413978864865505357476994635233100103444575833051841621838407153118 30389863261156014519711392855811554687052793150076629744413776832173285023318172 27983537275403031793183176699131823205331759575456477301342609943183109893783666 18266671226378563505784430500975196014957802879331572425730412488241312977972783 34336412595758016827809795311868100025154979021308914666748105056511151975346402 41433050399442008085229413522102191106850946784762482273937480439302328389034605 05296129252352397015735113359567607123269950596788703423728854611423299337552686 02110798904232806417274254101128249316331922646969964208233451317756650585459483 07167387945808671456943819581541595946216132085135544026580141594017213697366878 15739259319277750376639522935072720616923801313904676132157959237765974995743238 20450401535372302249557438239596813876232937667874423288432709537386151997477631 62793574619003152214284306960587983218047025517135771243279179055629295909435923 08819233024843905455693566024449637855213710344715147283366345136139915539402417 87000721700395337023198597529784886876095106996085805247478453939754951654085742 12156436615122339947289419711176097283492078276434588019036422220804268870035611 63456753654496537561968746183622388546685828635647792491893486771639208771751871 64363441692652994222973367487918070127795671150615762472787742454524182161310241 80346869257643536143389648121649352438561805926020082104668184472893206408468024 42194284566841770427247508798930305535477161143055090346385048983405109496966343 94649522576387000169033326190544796768638916857200902838185509225182538370017555 17545265160632697516469908758263977603458793495231807424050255490907951102910280 50754554879364909073228871755720166992425708240057349437053002445843562777775360 89916432027278497311828688562016848142833599406042842071192372963294651354792891 16140815490574667131339807761866747480821857883480139628852601506059767090397522 26114421760832093911997164570993656313733549969326604398588402742690372974009482 89891877237372044337754072095464991706194222067905683642725680154117126660594771 74623888904891878323805419324438368696120734002257958524514210605828598854917835 81051601227386686978027463428971982270672362516994724320619879504567944113131180 61680616981401579344986136021853293216398984693016032169044093579277348663281874 23624753190293923392112944164267828024739525107450508743708377150674578410531745 45952331804436416558219612157330150963969246854111199025163834207442491563662338 25138076246738304597635116922873658179417048962000301652637380768032113422430032 56894191147219423814984348574741440437693653874683488194348825692870064101038642 24133986436805063279803451251795411802727713439945821515681638251094711450839227 40478740564536061530904208901864122696992248891198122997079449681795002895820831 52094953225049175004074217664741746170867019476632462403725230891024045215365708 81407399298194422618117947960246923354250393710436020799243642911535552581797540 43630840774049942532905719489746660103177497375783180219853209557740552933120945 63172126188739267659964027042511757802990164817089592981516220771350380545606158 50834823475256557052275024001161369354197594440968395460808157016676778831255009 39127662829497487650778746519984360267314463584757395531954091724789903130968791 59084552141683236662782853871071114312771992132181794796808219606492768856875690 36798982143736135077936014530703822995779787423452729233843416391222424385212600 40530327155319057483787673193032870905765104120487416832543495670880547624092178 49239735495148979441973583400933755938755405943397519632005546896592412727148906 43023560524333659654276368546275689063468897057355699787316426612522956236807071 39751585677322014256983505425641562301193513282440798498556814752425302097223927 64047200169513522396042648649247618976867665504568999518816449234029071890918297 71792193352479160585713054780428222438187654578443825176370561613968295800461510 07327981767301777413025831037587759961097204145460258997651453318443201021062792 55589959854918363521234232188232779192824689632017700071733723826616377545374539 58412657698823719203696122165493963128266569649380979084489349734015960813454975 02728944783803972775864647465433982462933617049680364010676233971213817020637221 49253743022632893337099630398240132195905777377717561052253557175770070698318312 90707086415879232278922709270078288712315937075515060531306153342904969728873350 45667737527697829775969410692587621415072688982489962924218495842525601667288687 75476718534885360993611562578763385259388628635403529844705511367556690138476580 62735062476765424762644133398369403216261334575573617118874247547889205132421585 72325668772180688694442442858769290677315564232342192992899227002498775508975476 25540946582994182066888555385161917293641956954956477790708199344792512001696450 36330419740157049273107893046799260375599148220004602359170038451842216881190056 32370720560650600725841578379693927505938443643583137715700736690564335025862737 03139927267419473002131040004491870474599129162549005999827944886920430514828665 01755270722696065243765196918969002933174159288121473683432652394867543010171199 83923303119851933671868956832537591111691915819094712483833336599840734345600482 56140313982043576912761074443641915404174277707265404746677692448246645360470136 50268016692285558845333670175850839964178653815563950505927700188967094600506025 51298943804258953655781703335162341911917088342224490953276440181120393889357448 46458840703777822491205464551992831620563406189041847989732668737171696194015024 87101210875319050177510161772963116265559088319170625309571738457002124323296120 94473275547256558235086396981057971421017198654008797514907367712650577029610039 56171145878296473021162132749719726084350573305735453303360273330306135065597936 58036249722077449439803217112747496081955498138684464827634265373560850050885315 77476160265498005174239193575258583719987657857981905550018324295732931523849956 34325261719777542904943034443511593739647504280277901086156015188375826250085195 09765289764473766854871371566775982500897066872481594130342094524005278731580296 39806230897771826167984890962377306864657831639204205636753119768043140192247110 72436506146096855330436751149353749620334147392761123838966739971617486292098312 37655254953290844364736507559192481551594544491410862688292431115970710674496408 71600480207270609128797940916429990164274694349803994989055660125131284329813576 59070574854738146987332190519578522128639947570349980818982965499101192058273911 93789757155248631366130257938888382235783257878699663270052873079395956072676743 33392623609022603690062958116471744633204668322998376682735184734548154897476680 11517859610185629168209517462443474073051378085014045461150101737257388169693558 95638410242548516867249456370800861094360444275637001322249426043015924789085865 28825531819534418765922733519591215937958233154436116421684039008999964080111640 03066511267303350434615744212135833514960883275503218008923548332006315816374632 83418736888837870629897180788886120344613072187621524606648417638565119746242928 84529636753718056306434634083857562573070120786339004631460120882325810557390934 86514215339666390722216560551490983644496647585443296950848938674588810903940013 03990326563821734361860486932484699846153452046756469518502986396301902503685764 57691156676537527863222055343919607220052163717150352484054244478551234909246995 65213497458004531797525156839281240812875005763676378035905463569293685013217764 87346955092931168556666701406280209036015055426899730574038428444672132578492261 39254373625761523855900051470479053151978855491768160221400431244398891404118395 65241976050761009996875762090204784537394941276534069407751690581570765238791075 89113685887585737459566366179269323337202343004462017914895422555512784294407578 66426173442445841304120252482247901727790265690189143582197653119801082035070418 02110888748349705918589370512450359852959626949567690367958111798688546694694628 79996672624647645405798769916996343998579588511711489898759547111618729531280904 91346364097684173458935244309420219923603310815180250601608770484636351898694635 97609370866716180371389889182243554842737033888114494734394762231712136252593721 06186279289002360956443393207095508006420052126918146121456509564862389892536723 32661840932956649426859363676861085859463721941404740183234700212448807196776309 01989279637177671468548909911588818892710917002793155773524345494906402322027057 23972186998170612140700754099553259908500018071275134223353067884421122953963500 72668712179683066780465475480902762567026336775205532971810933131832331727830780 77229931692608135949301113809753234272165602218937912749945696474008793245432301 31953439791678347568557223066349031177893920864511342233372431759822352348815831 45818609360559751580508900765766528995100810700578259851354847629319154020599268 11306173836369404562886653941144151686680782681634907850781179590112511395378042 20057959068905014665649708981401084828676738834057057943559658291502902870241270 13169200087372500483937045147553309294306047452937373403688851031751372784853733 28139043592534079585001779277750896175705614541797527155656514676188419759652604 36370781474876132181581176765895844952766609546089200776511590910907226991780510 89325886626608726383759463400289271680108821007141218437953257898852564091122113 41029397921802734828989769848256780195404664240561579636240166439972080862132223 54939613444109295204093718211003811147060696996688089349167093119007245844908142 88526582682399286850117988061557995256751176258995913249898326239642949802177384 41204089463997081523352749708471963982244753249386581620046685834603128473237263 56462861941245165327319463703062468133294360778974773157774751996908581147472162 74143039720361826232907742541590134078726664817536821043111660653585566779134153 98711446276989849917028554091823997989113741264644901478751811890138474276223014 79459787774062229340512987202502763599229383510205426271407830643985084047842607 02140649852045942661032365454721635789312807205832578043911161438398962338879394 39652625766524968070996377298393399207685480631664165325997460773727440411911938 17519894983216089924928782063914942862329133421106028442812927414738784355891529 58025905641403302706276507730886955829976278017774257410077666968673128494959874 70511418080155592193262378440933734347414840895572820122955454686306614290237234 39318770979530265055504752329247935166710402893077119538396244551124458463081645 43207415523560832028841443844457668776038333370540082900456634315781971145475879 73680402148935012591569942124233181058801532434988034482812652357671202338986280 13086042250047611162272087104321314602997501494281747126676553851772976124959190 24785140762349764773313279264095206505804274578366658408187389251778918442609659 84600516738144338809290018602816886620052561645442229389803191679674185694573058 51639910987526116710959250430154303965993734525881307930060283432397812337303874 63035802855409745139115956192369768744119278178052822254500531793096837748243782 96102743007971821618119078100555256834294688119109595068043985545927379760274978 53633557372410293378314647655201469751002953262038378077135366581354630063273939 72621248260710980137267917129337778399975040412309881311664475768872557993022264 74993958193623938482619291351647491692903080911213668138030740844112983421668836 59777252240778882255837097614048900226255899759617367048681927730625062636666228 51499873733904604837067421140935353278663237325896578405149995644519025879911932 52829671024916713376273256181024243830687044935766720237704802814126692077125786 37510179183455367702111514734387449717939374268863487623920764211528235595764814 80082228196036552134503961523342681940237437903764386534853032267284960613604758 42391409863525062844949349193276293907374889594688971910597529475435616670796872 87377873343799414706093005845595959114944335124402124844025098091003990201159887 08466042595980006599624939155651353666782720452495789430185392231737613294864524 17405861149217556127011273058436773720031662959101607226471345336019682906173699 85281999294860977060186321631367915187974553039707614631063967020639476607020505 23184529689727633700881736347597131766488986551269651724739267151243381150342644 82052162805410044511457224216779548219834813319188140760742110305963125485908293 09123400100997825676909795259951569476680361842241982493685507128671458284748151 56005374488607069010178113706998310744444007950041092375983943554318252009093520 21941810787290582518067954599692716540897213460336252658534583082631770410351215 60530000487068100561279089991253130511207083780377799823299810544999167566869095 37782974444279976529918789752274475643130692434794974717316389412648035858664126 90888443931075574197849200564025773564438168330293577149068766534172761327610112 06306416834462721378511394492492773254090204051328936316760420855602085788314236 24070837576774241178696688978653804203783154910209742041873454803196836318485021 40490989958704251024106481821217715736830059212897586872495529287317301082833405 86915818295264228557926021240357790625401480392487808959503782044099413788148580 84949886130387159833144433056374982484671502221898814952035432730654601995859564 83837490783531411819876022059279909811052028217277944598941810370194511888176952 64420388230480657067766371588912901361170967817409969695907593146546205182654088 06588122174198944930321465640923814180346295240726899606246191017057356253230230 98680519998236444476407917664217901806946033105910674249573112222815954095433685 26242724328303025734772176554371342408654192536305330781991098192938584553304682 21682361194088740127555165788344169723495677932046994307814800736541462842668128 24304067228177227263331016041012538530135617242499689712544685111152652476839814 62565864695268574664865875217859800313578610953194095224100005706509655820526298 10643282534090036196199320653391483883384890821948538669838800189338474790779783 80995236509908782732806775660504503050946054688310991696745975961057039386424921 61451625874335009797372560888970472972185854916947821293483181172806728792294204 77917203224011828040792198221053174450870579379541709463210054590271903384383078 99094410034214549357670237533111668458088766402170459349579938572545898300669469 11639732216760005604752127232983706631040997740342791757402768640993333833479594 55023252528878244992428563879081121128903337835101440116769836675630124332679538 45373944178651174047006702234340457764042309550858619244561054482922209434417451 60924738522410869011660396406465775298172439096020778971313917354660526453199088 24892001323571096440132557940084004893953410685354820011330261260620921066645942 05030251419852442121013923219129798897777055703168966791404145996641842609384671 34454383921510660191889201563421656530283447655770659077450808468253142834650721 77911923168113533562869263183135611492521902505928337967648543331647113358662042 15706255325450841123562259997526739217238883094792638935381858181138306461984794 93502875046829400616314753810447736428146299404986567840247025457039655938280523 24962121779793782910054449964691530302605625835351337490173178273024132871118005 51246900533699006054999375753763837979895625153115226597510297164048792261706082 37650652790236059467235970522236348739054827176699383391728337486741026354979491 91575430043619787567538727738627077592793861646462950054345103759894470826584151 80930738769405564428304339873873545658271930883523492598070720133271456779734205 85618953250676967347523911431608006507564876219778373219913841964591663136772665 79342281174511699189171405050000928332684161834321550426255657804081723607166679 19768547365928503221256939817425817780593069934568443613114268743019689047944195 52192987050961654852305029577133816223678806424926395271050837225548570428188429 64391629748745285865477933876271780376918085829647951185834241240425413239891729 97673981197945372187141661582399431568135885043950401001404898867466335905212481 07792745147627659778517536964779713546293021254404629502520997103887011791965259 64025619915439527712065846461160320944856430176884681416235630844560235086133401 59158460201522372010950058419751479229972593767108428585923275220768175103074149 84853222282426509291595511859787447774242542623946782611481086256877158998520822 32056507495865888846958958463357628658029991162798731427260114564146151152207839 99828629822936707467328236765013640706271957191439701667687520561144211907280896
Whoosh! A bit over 24k decimal chars. Big enough?
tim -- Tim Rowledge, tim@rowledge.org, http://www.rowledge.org/tim Strange OpCodes: FSRA: Forms Skip and Run-Away
squeak-dev@lists.squeakfoundation.org