Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

SageMath crashes when doing simple function arithmetics

Hello,

I'm trying to run the following code which computes a simple rational function.

d = 4
p = (d+2)/(d-2)
W(r) = (1+r^2/(d*(d-2)))^(-(d-2)/2)
print(p*W(r)^(p-1))

This code works fine in "sagecell dot sagemath dot org" (it takes only a few seconds). But if I run it on my SageMath terminal (which I've installed yesterday, so it's up-to-date), I get : ' /usr/share/sagemath/bin/sage-python : ligne 2 : 3988 Processus arrêté sage -python "$@" '

The code works fine in my SageMath terminal if I replace d by d = 3, d = 5, d = 6 or even d = 100. I've identified that the problem is due to p = (d+2)/(d-2). When d = 4, if I replace p = (d+2)/(d-2) by p = 3 or p = RR((d+2)/(d-2)), it works. But I don't understand why it does not work otherwise ?

SageMath crashes when doing simple function arithmetics

Hello,

I'm trying to run the following code which computes a simple rational function.

d = 4
p = (d+2)/(d-2)
W(r) = (1+r^2/(d*(d-2)))^(-(d-2)/2)
print(p*W(r)^(p-1))

This code works fine in "sagecell dot sagemath dot org" (it takes only a few seconds). But if I run it on my SageMath terminal (which I've installed yesterday, so it's up-to-date), I get : ' /usr/share/sagemath/bin/sage-python : ligne 2 : 3988 Processus arrêté sage -python "$@" '

The code works fine in my SageMath terminal if I replace d by d = 3, d = 5, d = 6 or even d = 100. I've identified that the problem is due to p = (d+2)/(d-2). When d = 4, if I replace p = (d+2)/(d-2) by p = 3 or p = RR((d+2)/(d-2)), it works. But I don't understand why it does not work otherwise ?

EDIT :

This code was run on Ubuntu 20.04.3 (from Windows 10 using VirtualBox). SageMath 9.0 was installed using the command "sudo apt-get install". I didn't know this would not install the latest version. I'll try to update SageMath first and then we'll see.

SageMath crashes when doing simple function arithmetics

Hello,

I'm trying to run the following code which computes a simple rational function.

d = 4
p = (d+2)/(d-2)
W(r) = (1+r^2/(d*(d-2)))^(-(d-2)/2)
print(p*W(r)^(p-1))

This code works fine in "sagecell dot sagemath dot org" (it takes only a few seconds). But if I run it on my SageMath terminal (which I've installed yesterday, so it's up-to-date), I get : ' /usr/share/sagemath/bin/sage-python : ligne 2 : 3988 Processus arrêté sage -python "$@" '

The code works fine in my SageMath terminal if I replace d by d = 3, d = 5, d = 6 or even d = 100. I've identified that the problem is due to p = (d+2)/(d-2). When d = 4, if I replace p = (d+2)/(d-2) by p = 3 or p = RR((d+2)/(d-2)), it works. But I don't understand why it does not work otherwise ?

EDIT :

This code was run on Ubuntu 20.04.3 (from Windows 10 using VirtualBox). SageMath 9.0 was installed using the command "sudo apt-get install". install sagemath". I didn't know this would not install the latest version. I'll try to update SageMath first and then we'll see.