He used the convertion formula to get both possible values.
#include <stdio.h>
#include <string.h>
typedef unsigned int u32;
/* This should maybe go into dvb-core/dvb_math.c */
static u32 gold2root(u32 gold)
{
u32 x, g;
if (gold >= 0x3ffff)
gold = 0;
for (g = 0, x = 1; g < gold; g++)
x = (((x ^ (x >> 7)) & 1) << 17) | (x >> 1); return x;
}
int main(int argc, char *argv[])
{
u32 gold = atol(argv[1]);
u32 root = gold2root(gold);
printf("gold %d -> root %d\n", gold, root);
return 0;
}
Above is from Digital Devices:
https://github.com/D...f1250bbbeb0c7c6
With above code you can get ouput in a file, for greping, or in db...
seq 0 262143 | xargs -L1 r2g > r2g.log
gold 0 -> root 1
gold 1 -> root 131072
gold 2 -> root 65536
...
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916