On 6/23/2012 9:55 AM, Barton Willis wrote:
> Surely the bug is related to the fact that the last call to resultant returns 256*(sqrt(7)^2-7) instead of 0.
Ah, yes that would account for it.
I just try typing
resultant(8*y^2+sqrt(7)-4,8*y^2-8*y-sqrt(7)-2,y);
and got 0.
However,
resultant(rat(8*y^2+sqrt(7)-4),rat(8*y^2-8*y-sqrt(7)-2),y);
returns 256*(sqrt(7)^2-7).
So the result in CRE ("rat") form is simplified according to its lights.
Here's a fix:
:lisp (setf (symbol-function 'oldres)(symbol-function '$resultant))
:lisp (defun $resultant(a b c)($ratsimp(oldres a b c)))
now solve works.