strange behavior in reading in rational fractions

Kevin Ryde user42 at
Tue Apr 6 22:58:18 CEST 2004

Nathan Moore <nmoore at> 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.

More information about the gmp-discuss mailing list