Found while measuring #272, and not fixed by it.
x^n - c = 0 is answered by inverting x^n = c, which gives the roots in a + bi form. For n = 5 and n = 6 some of those parts are left as an unevaluated trigonometric call rather than as the exact value they have:
solve x^6 - 1 = 0
{ 1, 1/2 + i * 1/2 * sqrt(3), -1/2 + i * 1/2 * sqrt(3), -1,
-1/2 + i * 1/2 * sqrt(3) * (-1), 1/2 + i * sin(5/3 * pi) }
^^^^^^^^^^^^^^
solve x^5 - 1 = 0
{ 1, 1/4 * (sqrt(5) - 1) + i * 1/4 * sqrt(10 + 2 * sqrt(5)),
cos(4/5 * pi) + i * 1/4 * sqrt(10 - 2 * sqrt(5)), ...,
^^^^^^^^^^^^^
1/4 * (sqrt(5) - 1) + i * sin(8/5 * pi) }
^^^^^^^^^^^^^
sin(5/3 * pi) is -sqrt(3)/2 and cos(4/5 * pi) is -(1 + sqrt(5))/4, so these are exact answers wearing an unevaluated form. The other roots of the same equation are written out, so the output is not even internally consistent: x^6 - 1 gives its second root as 1/2 + i * 1/2 * sqrt(3) and its last as 1/2 + i * sin(5/3 * pi), which are conjugates.
This is the same complaint as #272 ("awful responses for 3+ degree polynomials"), and it survives the fix for it in #742 — two-term polynomials are deliberately left to the inversion route there, because for x^3 - 8 that route gives the better answer.
Fixing it means either evaluating the sin/cos of these rational multiples of pi where an exact value exists, or having the inversion route produce the value directly. The exact-value table for inverse trig constants added earlier (#569/#179) is the neighbouring machinery.
Measured on 40ce1093.
Found while measuring #272, and not fixed by it.
x^n - c = 0is answered by invertingx^n = c, which gives the roots ina + biform. For n = 5 and n = 6 some of those parts are left as an unevaluated trigonometric call rather than as the exact value they have:sin(5/3 * pi)is-sqrt(3)/2andcos(4/5 * pi)is-(1 + sqrt(5))/4, so these are exact answers wearing an unevaluated form. The other roots of the same equation are written out, so the output is not even internally consistent:x^6 - 1gives its second root as1/2 + i * 1/2 * sqrt(3)and its last as1/2 + i * sin(5/3 * pi), which are conjugates.This is the same complaint as #272 ("awful responses for 3+ degree polynomials"), and it survives the fix for it in #742 — two-term polynomials are deliberately left to the inversion route there, because for
x^3 - 8that route gives the better answer.Fixing it means either evaluating the
sin/cosof these rational multiples of pi where an exact value exists, or having the inversion route produce the value directly. The exact-value table for inverse trig constants added earlier (#569/#179) is the neighbouring machinery.Measured on
40ce1093.