Sören Lennart Berg on Sat, 11 Aug 2012 02:07:14 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

poolroots division by zero


I'm getting a 'division by zero' from polroots for the following input:

? polroots(64.0*z^6-640.0*z^5+2640.0*z^4-5760.0*z^3+7040.0*z^2-4608.0*z+1280.0)
  ***   at top-level: polroots(64.0*z^6-64
  ***                 ^--------------------
  *** polroots: division by zero
  ***   Break loop: type 'break' to go back to GP

using integer coefficients everythings just fine:
? polroots(64*z^6-640*z^5+2640*z^4-5760*z^3+7040*z^2-4608*z+1280)
%1 = [2.0000000000000000000000000000000000000 + 0.E-38*I, 2.0000000000000000000000000000000000000 + 0.E-38*I, 2.0000000000000000000000000000000000000 + 0.E-38*I, 2.0000000000000000000000000000000000000 + 0.E-38*I, 1.0000000000000000000000000000000000000 - 0.50000000000000000000000000000000000000*I, 1.0000000000000000000000000000000000000 + 0.50000000000000000000000000000000000000*I]~

For your interest: the library function roots0() with flag set to 1 works/doesn't crash.

Best regards,
Sören Lennart Berg