bezout() yields different results under MSWindows vs Linux
@sgougeon)
Reported by Samuel GOUGEON (Bug description
-->P = poly(2:2:30, "x");
-->dP = derivat(P);
-->[g,U] = bezout(P,dP)
yields:
* With 5.5.2 under Win7_x64:
-------------------------
U =
0 15
0.0666667 16 - x
g =
2 3 4 5 6 7 8
4.740D+15 - 6.735D+15x + 4.143D+15x - 1.478D+15x + 3.446D+14x - 5.587D+13x + 6.527D+12x - 5.603D+11x + 3.564D+10x
9 10 11 12 13 14
- 1.676D+09x + 57488898x - 1397760x + 22810.667x - 224x + x
* With 5.5.2 under Linux/Fedora 22:
--------------------------------
-->[g,U] = bezout(P,dP)
U =
column 1
2 3 4 5 6
0.0000003 - 0.0000004x + 0.0000003x - 8.730D-08x + 1.884D-08x - 2.787D-09x + 2.924D-10x
7 8 9 10 11 12
- 2.211D-11x + 1.209D-12x - 4.741D-14x + 1.298D-15x - 2.354D-17x + 2.542D-19x
13
- 1.236D-21x
2 3 4 5 6
0.0000002 - 0.0000003x + 0.0000002x - 8.321D-08x + 2.080D-08x - 3.578D-09x + 4.398D-10x
7 8 9 10 11 12
- 3.943D-11x + 2.602D-12x - 1.263D-13x + 4.446D-15x - 1.104D-16x + 1.834D-18x
13 14
- 1.826D-20x + 8.240D-23x
column 2
2 3 4 5 6
7.109D+16 - 9.815D+16x + 5.822D+16x - 1.988D+16x + 4.400D+15x - 6.716D+14x + 7.321D+13x
7 8 9 10 11 12
- 5.809D+12x + 3.378D+11x - 1.435D+10x + 4.384D+08x - 9336526.1x + 130726.73x
13 14
- 1072.3354x + 3.854891x
2 3 4 5 6
4.285D+16 - 6.936D+16x + 4.773D+16x - 1.883D+16x + 4.811D+15x - 8.503D+14x + 1.080D+14x
7 8 9 10 11 12 13
- 1.009D+13x + 7.002D+11x - 3.622D+10x + 1.387D+09x - 38614848x + 756846.1x - 9839.7513x
14 15
+ 75.600912x - 0.2569927x
g =
1
Error log
None. Answer depending on the OS
How to reproduce the bug
P = poly(2:2:30, "x");
dP = derivat(P);
[g,U] = bezout(P,dP)
OTHER INFORMATION:
- The "Windows answer" does not depend on the main Math package installed: both the default and the Intel ones yield same results.
- This bug has been detected here: http://mailinglists.scilab.org/Users-fr-Racines-multiples-d-un-polynome-tp4032750p4032818.html