#!/usr/bin/env python import math radix = 8 scale = 1< 0: stop = int(round(math.log(-math.expm1(-byx/scale)) * out_scale)) if stop == 0: break byx = byx + 1. print "static const uint16 logsub_table[] = {" for i in range(0,len(logtab),10): if i+10 <= len(logtab): print ", ".join(str(x) for x in logtab[i:i+10]) + "," else: print ", ".join(str(x) for x in logtab[i:]) print "};"