Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.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: Best search algorithm to find a condition within a range. Date: Thu, 09 Apr 2015 17:04:34 +0100 Organization: A noiseless patient Spider Lines: 15 Message-ID: <871tjt2sq5.fsf@bsb.me.uk> References: <87vbh8yvgv.fsf@bsb.me.uk> <777f7633-724b-442e-864b-d6484c5e87cf@googlegroups.com> <87pp7gysv5.fsf@bsb.me.uk> <2186a589-be06-4453-affc-3c84f9e48379@googlegroups.com> <87egnwymxr.fsf@bsb.me.uk> <2016084.ADp8TKvx9G@PointedEars.de> <5902185.dpbNY2YNC7@PointedEars.de> <1936096.bgrWbIOXpn@PointedEars.de> <6732c49b-03c9-4173-81da-9ee6ab2e48ef@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="16162"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2dsiCSvyRTsiyYgMfeNUDj06WJIqYOeI=" Cancel-Lock: sha1:AM7XxHAxQcCx7ziUUNHSGD18ppo= sha1:pyy8lzdqIV9gIfbixG/2GYSiHT8= X-BSB-Auth: 1.68bc1a5b2555dd66cccf.20150409170434BST.871tjt2sq5.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:27278 jonas.thornvall@gmail.com writes: > [...] I think this will be the first implementation ever to use > arithmetic in the base of your choice. What makes you think that? I had to do it as a student exercise and I, in turn sometimes *set* it as an exercise. I imagine it's been done hundreds of thousands of times. When arbitrary-precision arithmetic is implemented "seriously", the base is usually fixed (at compile time at least) because for any particular environment there will be a fastest base, and there is little point in using anything else. -- Ben.