Best search algorithm to find condition within a range

jonas.thornvall at gmail.com jonas.thornvall at gmail.com
Wed Apr 8 01:50:47 EDT 2015


Den onsdag 8 april 2015 kl. 00:57:27 UTC+2 skrev Steven D'Aprano:
> On Tue, 7 Apr 2015 07:44 pm, jonas.thornvall at gmail.com wrote:
> 
> 
> > I want todo faster baseconversion for very big bases like base 1 000 000,
> > so instead of adding up digits i search it.
> 
> What digits would you use for base one-million?
> 
> Base 2 uses 0 1.
> Base 3 uses 0 1 2.
> Base 10 uses 0 1 2 3 4 5 6 7 8 9.
> Base 16 uses 0 1 2 3 4 5 6 7 8 9 A B C D E F.
> 
> Base one million uses what?
> 
> How would you write down 12345 in base one-million?
> 
> 
> 
> -- 
> Steven

Well digit places have to be comma separated i think i told you, in low bases we have unique digits so there is no problems write out numbers without separaation of digitplaces. But when the base is higher than the number of digits you have a choice to make. Either you invent a new numeral(number digit.

I think you realise that BB = 11,11

So your example would of course be ,12345

I hope you see A,B,C,D,E,F is only replacement for 10,11,12,13,14,15



More information about the Python-list mailing list