Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Overflow, integers and strings Date: Mon, 04 May 2015 15:41:41 +0100 Organization: A noiseless patient Spider Lines: 43 Message-ID: <87d22ge76i.fsf@bsb.me.uk> References: <6ca07e69-1694-49c1-93eb-748c44d8ab68@googlegroups.com> <871tj08vrb.fsf@bsb.me.uk> <1997740.h7VUlrh2Em@PointedEars.de> <72e44d34-7f4d-4d32-8304-e73688132274@googlegroups.com> <3770518e-e91f-4368-9a69-cbd2f2461343@googlegroups.com> <87lhh5zmuy.fsf@bsb.me.uk> <9e56ec52-91b5-4e3e-9206-fd970fa69254@googlegroups.com> <2a1bdab8-bc0e-4a82-bce5-37c151ba4b47@googlegroups.com> <87zj5kebta.fsf@bsb.me.uk> <87oam0e7t7.fsf@bsb.me.uk> <1a007e67-3a14-424d-b480-c2d909c1f553@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="14154"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Sn+35NcXmxCHl7SlFQV6Bk5tnidoLMH4=" Cancel-Lock: sha1:pemoKGht3DSa5LJW96JDj0K7+l0= sha1:0fjDGBnj4klyB/slvCuL0spmRKs= X-BSB-Auth: 1.ac50f9507a0cce44573c.20150504154141BST.87d22ge76i.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:27487 jonas.thornvall@gmail.com writes: > Den måndag 4 maj 2015 kl. 16:28:09 UTC+2 skrev Ben Bacarisse: >> jonas.thornvall@gmail.com writes: >> >> > Den måndag 4 maj 2015 kl. 15:01:44 UTC+2 skrev Ben Bacarisse: >> >> jonas.thornvall@gmail.com writes: >> >> >> >> > This is only an outline / pseudocoe for how the base conversion would >> >> > look with bignumb implementation will look. You have to check the >> >> > arrays so they contain intergers and not chars, that is probably what >> >> > fail in first loop. >> >> >> >> There is no value in using a bugnum for the base in a bignum >> >> implementation. This whole part of the project is a waste of time >> >> (unless you just want learn ECMAScript programming but that seems >> >> unlikely). >> > >> > I can see that the implementation faster multiplying in base 2048 >> > rather than base 2, although it right now cause overflows if number >> > outside integer scope for all bases other than 10. >> >> I can't follow this. >> >> > I will fix that though, and that it will becom apparent when >> > multiplying big numbers which approach is faster. >> > >> > Binary base or bignumb base. >> > >> > That is a fact. >> >> What is a fact? Do you think that using a base that is itself a bignum >> will help in some way? >> >> -- >> Ben. > > No the magnitude of the base will help. Do you have any evidence for that? What is the optimal base to use? -- Ben.