marco.bodr...@tutanota.com writes:
> The only reason why I prefer my solution is: when cmp<0, there is no need to
> compute
> mpz_sub (t1, t0, t1);
That's certainly a micro optimization, but let's keep things simple.
I've pushed this fix now, I think there were only comment and ChangeLog
change
Ciao Vincent,
15 dic 2023, 13:26 da vinc...@vinc17.net:
> Note that there are similar issues in printf/repl-vsnprintf.c, and I
>
I finally had the time to examine the code and test it. I attach a proposed
patch.
I changed the 3 files: printf/doprntf.c, printf/repl-vsnprintf.c,
printf/sprintff
Ciao Niels,
18 feb 2024, 10:10 da ni...@lysator.liu.se:
> marco.bodr...@tutanota.com writes:
>
>> What about;
>>
>>
>> /* Arrange so that |s| < |u| / 2g */
>> mpz_add (s1, s0, s1);
>> {
>> int cmp = mpz_cmpabs (s0, s1);
>> if (cmp >= 0)
>> {
>> mpz_swap (s0, s1);
>>
marco.bodr...@tutanota.com writes:
> s==0 is not a special case, it's one of the cases with smaller |s|.
Right, s == 0 is not a special case in itself, what's special is the
case g = a = b, then we have too candidate cofactor pairs, s=1, t=0,
s'=0, t'= 1. And we have the asymmetric preference for