Infinite loop case for FPminimax (from gforge #7217)
Imported issue: Initially reported by @chevilla in https://gforge.inria.fr/tracker/?group_id=1015&aid=7217
It was known (but never observed) that fpminimax could enter into an infinite loop. Mioara exhibited such a case:
f=sqrt(x); d=[1+153/512, 1+154/512];
fpminimax(f, 2, [|18, 10, 14|], d2);
In fact fpminimax switches infinitely between the two following polynomials. They both do not respect the formats constraints. But using the first one to guess the exponents leads to the second one and reciprocally.
p = -1.0101001001_2 * 2^(-5) * x^2 + 1.000101111_2 * 2^(-1) * x + 1.000000000010010111_2 * 2^(-1);
q = -1.10011010101101_2 * 2^(-4) * x^2 + 1.0110011_2 * 2^(-1) * x + 1.1001101001000011_2 * 2^(-2);
I do not know how to solve this issue now.