Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Javascript comparissons cause overflow Date: Sat, 04 Apr 2015 16:01:29 +0100 Organization: A noiseless patient Spider Lines: 27 Message-ID: <877fts0wfq.fsf@bsb.me.uk> References: <5e062687-8e2f-4bc3-94ce-e42df1cb1288@googlegroups.com> <22e81bec-1e4d-4022-9e14-f72074c17015@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="4488"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189kU66TTO8Zge8Ylom8CYDqWwuLiUPIT0=" Cancel-Lock: sha1:O0Ief5x5ty1c53+gVBu0PlBLfIk= sha1:BMCB/nv/ABnHdab6g9TMX7XTxrY= X-BSB-Auth: 1.2d1c5fc502d6cb05649b.20150404160129BST.877fts0wfq.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:27186 jonas.thornvall@gmail.com writes: > Den lördag 4 april 2015 kl. 09:35:04 UTC+2 skrev jonas.t...@gmail.com: >> After i managed to write some functions actually doing arithmetic in >> bignumbers, basicly by handling them as strings where digit places >> read into an array. >> >> I decided to try change a previously written basechanger into also >> handling bignumbs. And it proved to be a much harder task than i >> origially thought. >> >> How do you go from compare size of integers to compare size of >> stored digitplaces in arrays? I can't interpret this question. Comparing bignums should not be hard. > This is probably why bignumb should be supported right out of the box > in programming languages. Many languages have unbounded integers and/or some other form of bignum built-in (even more have them as a library extension but that can be less convenient). Is there a reason you have to use javascript? -- Ben.