@(bind scale 16384)
@(bind type "unsigned int")
@(bind logs @(tuples 4 ^(0.0 0.0
                         ,*(take 63
                                 (mapcar* [chain log2 / (op * scale) ceil toint]
                                          (range 2))))))
@(output)
/*
 * A table of the logs of 2 for various bases scaled by a factor
 * and converted to integer.
 *
 * This table is used to compute output lengths for the mp_toradix
 * function.
 */

#define MP_LOG_SCALE @scale

const @type s_logv_2[] = {
@  (repeat)
  @(rep)@logs, @(last)@logs,@(end)
@  (last)
  @(rep)@logs, @(last)@logs@(end)
@  (end)
};
@(end)