On Fri, 20 Apr 2018, paul zimmermann wrote:

Only 0 can have lazy allocation, and I think we document that it isn't
legal to put 0 on the denominator.

where is this documented?

That was in a "I think" sentence. Now that I looked a bit more, I don't find it... Well, you can't call any mpq function that reads that mpq_t, but we don't say you can't write to that mpq_t.

In mpfr_set_q we use the fact that the user can set q to 1/0
for example to represent +Inf.

I didn't remember that MPFR did that, but I did remember that some people did that. I'll count it as a vote for Marco's patch.

--
Marc Glisse
_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to