sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 453 forks source link

taylor series fails with `MACSYMA-QUIT undefined` #31611

Open 299dd376-0904-4b01-92dc-d57318e7d9ab opened 3 years ago

299dd376-0904-4b01-92dc-d57318e7d9ab commented 3 years ago

I have a problem (context: trying to find radius of convergence of a Taylor series related to Newton's method). Sage throws a bizarre exception without any useful information. Changing from QQbar to CC or CDF doesn't work for every root due to floating point overflow (it does work ok for the first two roots).

c = polygen(QQbar)
h = c^6 + 3 * c^5 + 3 * c^4 + 3 * c^3 + 2 * c^2 + 1
hh = diff(h, c)
c = h.roots()[2][0]
f(z) = z - h(c + z) / hh(c + z)
g = taylor(f(z), z, 0, 20) # gives error
t = g.coefficients(z, sparse=False)
print(c, abs(t[18] / t[19]), abs(t[17] / t[18]))
...
RuntimeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.

On Debian Bullseye:

$ apt-cache policy sagemath
sagemath:
  Installed: 9.2-2
  Candidate: 9.2-2
  Version table:
 *** 9.2-2 990
        990 http://ftp.uk.debian.org/debian bullseye/main amd64 Packages
        990 http://ftp.uk.debian.org/debian testing/main amd64 Packages
        500 http://ftp.uk.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status
     8.6-6 500
        500 http://ftp.uk.debian.org/debian buster/main amd64 Packages

sagecell permalink:

https://sagecell.sagemath.org/?z=eJw9jc0OgjAQhO8kvMMeW62I-IcHr949k5rU2lISQknbCzy9o1FO--3MzqymK42-n1ozsPv9qQLPMwdNP060pj2tQMeFDgvtQdWXKtAOoU_q1VnLnCCNFo3dFcH7FBlvKtmUMs8smzn0mTbkmEYS65bcn_OshZvU1PvAPreCZkGloKqEl-C1hfbG2k53ZkAx3DiqEM31pvpocDSGbkhMC1LPyFKzqyUeYF4kX7TzT6sl52-kc0OM&lang=sage&interacts=eJyLjgUAARUAuQ==

Sorry for leaving component as "please change": I don't know where it is wrong.

Component: PLEASE CHANGE

Issue created by migration from https://trac.sagemath.org/ticket/31611

299dd376-0904-4b01-92dc-d57318e7d9ab commented 3 years ago
comment:1

also fails on Debian Buster

$ apt-cache policy sagemath
sagemath:
  Installed: 8.6-6
  Candidate: 8.6-6
  Version table:
 *** 8.6-6 500
        500 http://deb.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status
mkoeppe commented 3 years ago
comment:2

Moving to 9.4, as 9.3 has been released.