Added gmp_div_q round param

And fixed val_len var