From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: rmartin@oma.com (Robert C. Martin) Subject: Re: OO, C++, and something much better! Date: 1997/01/27 Message-ID: #1/1 X-Deja-AN: 212554372 references: <5bphq4$5js@mulga.cs.mu.OZ.AU> <32E05FAF.47BA@concentric.net> <5buodl$bci@boursy.news.erols.com> <32E2FEC7.2F7B@concentric.net> <6PE5zLpF3RB@herold.franken.de> <32E57E2B.6CB7@epix.net> <32E57FBC.2325@epix.net> <5c4ita$3qs@mulga.cs.mu.OZ.AU> <32E6797A.6E21@parcplace.com> organization: Object Mentor Inc. newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.c++,comp.lang.smalltalk,comp.object Date: 1997-01-27T00:00:00+00:00 List-Id: In article <32E6797A.6E21@parcplace.com>, clayberg@parcplace.com wrote: > Fergus Henderson wrote: > > I don't know how it got its start there, but I have heard that it got a > > bit of a boost after the stockmarket crash in '87. Apparently the > > volume of shares traded was very high, and many financial programs > > failed, because the numbers involved were so large that they overflowed > > various limits, but the Smalltalk programs kept running, because > > Smalltalk quietly switches to using floating point arithmetic when > > integer arithmetic overflows. (Well, that's the rumour anyway. I > > don't know how much truth there is to it.) > > Actually, Smalltalk transparently switches to using "large" integers > that have no limits on size. In fact, it's actually fun to run large > factorials in Smalltalk to see how large an integer it will generate. > VisualSmalltalk will calculate the result of "1000 factorial" in a > second or two and display the results. BTW, the result of that > expression is: :-) > > 4023872600770937735437024339230039857193748642107146325437999104299385123986290 > 2059204420848696940480047998861019719605863166687299480855890132382966994459099 > 7424504087073759918823627727188732519779505950995276120874975462497043601418278 > 0946464962910563938874378864873371191810458257836478499770124766328898359557354 > 3251318532395846307555740911426241747434934755342864657661166779739666882029120 > 7379143853719588249808126867838374559731746136085379534524221586593201928090878 > 2973084313928444032812315586110369768013573042161687476096758713483120254785893 > 2076716913244842623613141250878020800026168315102734182797770478463586817016436 > 5024153691398281264810213092761244896359928705114964975419909342221566832572080 > 8213331861168115536158365469840467089756029009505376164758477284218896796462449 > 4516076535340819890138544248798495995331910172335555660213945039973628075013783 > 7615307127761926849034352625200015888535147331611702103968175921510907788019393 > 1781141945452572238655414610628921879602238389714760885062768629671466746975629 > 1123408243920816015378088989396451826324367161676217916890977991190375403127462 > 2289988005195444414282012187361745992642956581746628302955570299024324153181617 > 2104658320367869061172601587835207515162842255402651704833042261439742869330616 > 9089796848259012545832716822645806652676995865268227280707578139185817888965220 > 8164348344825993266043367660176999612831860788386150279465955131156552036093988 > 1806121385586003014356945272242063446317974605946825731037900840244324384656572 > 4501440282188525247093519062092902313649327349756551395872055965422874977401141 > 3346962715422845862377387538230483865688976461927383814900140767310446640259899 > 4902222217659043399018860185665264850617997023561938970178600408118897299183110 > 2117122984590164192106888438712185564612496079872290851929681937238864261483965 > 7382291123125024186649353143970137428531926649875337218940694281434118520158014 > 1233448280150513996942901534830776445690990731524332782882698646027898643211390 > 8350621709500259738986355427719674282224875758676575234422020757363056949882508 > 7968928162753848863396909959826280956121450994871701244516461260379029309120889 > 0869420285106401821543994571568059418727489980942547421735824010636774045957417 > 8516082923013535808184009699637252423056085590370062427124341690900415369010593 > 3983835777939410970027753472000000000000000000000000000000000000000000000000000 > 0000000000000000000000000000000000000000000000000000000000000000000000000000000 > 0000000000000000000000000000000000000000000000000000000000000000000000000000000 > 0000000000000000000000000000000000000000 It is the hallmark of large factorials, that they terminate with lots of zeros. More interesting yet is that regardless of what radix you convert the factorial to, providing the radix is not much larger than the factorialized number, the factorial will *still* terminate in a lot of zeroes. Just thought this thread needed a little hard data. -- Robert C. Martin | Design Consulting | Training courses offered: Object Mentor | rmartin@oma.com | Object Oriented Design 14619 N Somerset Cr | Tel: (847) 918-1004 | C++ Green Oaks IL 60048 | Fax: (847) 918-1023 | http://www.oma.com "One of the great commandments of science is: 'Mistrust arguments from authority.'" -- Carl Sagan