Den torsdagen den 17:e juli 2014 kl. 20:06:23 UTC+2 skrev Ben Bacarisse:
> jonas.thornvall@gmail.com writes:
>
> <snip>
>
> > Managed to reduce some conditional checks, well they was unnecessary
>
> > to start with.
>
> <snip>
>
> > set = 0;
>
> > i = 0;
>
> > while (i * basemultip <= number && i < bas)
>
> > {
>
> > j = i;
>
> > i ++ ;
>
> > set = 1;
>
> > }
>
> > if (set == 1)
>
>
>
> Here, the conditions set == 1 and i > 0 are the same. There's no need
>
> for 'set'.
>
>
>
> <snip>
>
> --
>
> Ben.
Would it be possible to go direct to bijective code from this by reduce the previous digit when a zero appear and make next digit base, and if another 0 follow reduce that base value-1, sort of roll it off?