Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news.swapon.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:28:04 +0100 Organization: A noiseless patient Spider Lines: 33 Message-ID: <87oam0e7t7.fsf@bsb.me.uk> References: <66061bf2-9092-42a5-918e-5a039a53db20@googlegroups.com> <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> 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="9267"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Z61bjtF0Skthcb6Xw8yf9ANljOzwZWrM=" Cancel-Lock: sha1:+jRh+/eI8Rf2uDqUwTOhijrMZKc= sha1:kQSXR8WC5IlmxYt0DG80c1edJIo= X-BSB-Auth: 1.3e7990b82744cc2e628c.20150504152804BST.87oam0e7t7.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:27483 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.