Thanks, Mario. Worked like a charm. Why is that not part of the base package?
Eu morava nos estados de Sao Paolo e Parana desde 1971 a 1973. Eu me gostei muito desse tempo. Pardon my portuguese - it's been decades. Steve --- --- On Fri, 6/3/11, Mario Domenech Goulart <[email protected]> wrote: > From: Mario Domenech Goulart <[email protected]> > Subject: Re: [Chicken-users] Different factorial results > To: "Steve Graham" <[email protected]> > Cc: "Chicken-users" <[email protected]> > Date: Friday, June 3, 2011, 10:36 AM > Hi Steve, > > On Fri, 3 Jun 2011 07:26:58 -0700 (PDT) Steve Graham <[email protected]> > wrote: > > > In running (factorial 50) > > > > (define (factorial n) (if (< n 2) 1 (* n (factorial > (- n 1))))) > > > > I found that Chicken Scheme's result differed from > Petite Chez, Kawa and Gambit. The former gave > > > > 3.04140932017134e+064 > > > > and the latter 3 gave > > > > > 30414093201713378043612608166064768844377641568960512000000000000 > > > > Why the difference? > > It seems that you are not using the numbers egg > (http://wiki.call-cc.org/egg/numbers). > > The full numeric tower support is provided as an > extension. > > Just > > $ chicken-install numbers > > csi> (use numbers) > csi> (define (factorial n) (if (< n 2) 1 (* n > (factorial (- n 1))))) > csi> (factorial 50) > 30414093201713378043612608166064768844377641568960512000000000000 > > > Best wishes. > Mario > -- > http://parenteses.org/mario > _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
