pari gp reference implementation ported to scala to test l2r binary partial xgcd
order of data