Nathan Moore <nmoore at physics.umn.edu> writes: > > mpq_inp_str(f_in[i], DATA, 10); > fscanf(DATA,","); This is the way to do it. mpq_inp_str reads numbers, not commas. > The output without the fscanf is incorrect, Make sure you check for the error return from mpq_inp_str.