User blog comment:Deedlit11/Bignum Bakeoff appetizer/@comment-2033667-20140915210818

Another worms implementation. C


 * 1) define W ; while (
 * 2) define R ; return w; }

x(w, t) { int k = 8, g = w, b;	if (w & 7) { W ((g /= 8) & 7) >= (w & 7)) k *= 8;		b = w % k - 1;		w = g		W t--) w = w * k + b;	} else w /= 8 R

main { int m = 7, w = 2 W m)		m = x(m, w++)	R