Sorry it took so long for me to look into this. Finding even an hour of
time to work on MPIR for the last year or so has been almost impossible.

I can confirm that even GMP 5.0.5 had:

* if |a| = |b| then s = 0, t = sgn(b)

So in the example Jeroen gave, the result should clearly be s, t = 0, 1.

Unfortunately, MPIR-2.6.0 did not have this, so I would consider this a bug
in earlier versions of MPIR, since we are supposed to be compatible with
GMP. It's clearly right in MPIR-2.7.0-alpha, since we use their xgcd code
not our own.

Having said that, I don't really know the history of this function in GMP,
except that at some point, ages ago, there was a change in normalisation.
There may have been further work since then, I didn't check. So we might
just be late catching up.

What I will now do is update both our test code and documentation to match
that of GMP for this function. This ought to ensure compliance to their
interface, for now.

Bill.

On 6 December 2014 at 00:49, Jean-Pierre Flori <jpfl...@gmail.com> wrote:

> Bill, sorry to bump that post, but i would really like to see MPIR updated
> in Sage for my work.
>
>
> On Thursday, November 27, 2014 6:40:15 PM UTC+1, Jean-Pierre Flori wrote:
>>
>>
>>
>> On Monday, November 24, 2014 3:06:49 PM UTC+1, Jean-Pierre Flori wrote:
>>>
>>> Ok, the change was to be expected.
>>> The previous code swapped the args order between the calls to mpz_gcdext
>>> and mpz_gcdext in case a==b, and then the output.
>>> I guess it's not to be considered a bug then.
>>>
>>> I have no idea if anything is random in there though.
>>>
>> Bill, any comment on that?
>> It would be nice to upgrade MPIR to any 2.7.0 alpha in Sage if that's
>> possible :)
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to