incr = 2^2;
handle = fopen("sintable.cpp","w");
handle2 = fopen("sintable.h", "w");
fprintf(handle,"extern const short sinTable[] = {");
fprintf(handle2,"#ifndef sintable_h\n#define sintable_h\nextern const short sinTable[%d];\n",
        (2^14 / incr)+1);
fprintf(handle2,"#endif\n");
fclose(handle2);
for i = [0 : incr : 2^14-1]
fprintf(handle, "%d, ", floor(sin(i * pi / 2^15)*(2^15-1)));
endfor
fprintf(handle, "%d };\n",floor(sin(pi / 2)*(2^15-1)));
fclose(handle);