latex() command makes sage 9.5 coredump. Any workaround?
I noticed this problem in 9.5. I do not know if this is a new issue or not.
This seems to happen on some output and so far see it happen when trying to generate latex from from maxima integrate result only but could also when using other algorithms. I need to check more. Here is an example
>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5, Release Date: 2022-01-30 │
│ Using Python 3.10.2. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
sage: var("x")
x
sage: anti = integrate(1 / (1 + cos(x) ^ 5), x, algorithm="maxima")
sage: latex(anti)
// Giac share root-directory:/usr/share/giac/
// Giac share root-directory:/usr/share/giac/
Added 0 synonyms
Precision problem choosing root in common_EXT, current precision 14
Precision problem choosing root in common_EXT, current precision 28
Precision problem choosing root in common_EXT, current precision 56
Precision problem choosing root in common_EXT, current precision 112
Precision problem choosing root in common_EXT, current precision 224
Precision problem choosing root in common_EXT, current precision 448
Precision problem choosing root in common_EXT, current precision 896
Segmentation fault (core dumped)
>
Repeating the above, but using "fricas" instead of "maxima" shows no issues and the latex is generated with no problem. This is on Arch Linux running inside Virtual box.
>which sage
/bin/sage
>which maxima
/bin/maxima
>sage --version
SageMath version 9.5, Release Date: 2022-01-30
>maxima --version
;;; Loading #P"/usr/lib/ecl-21.2.1/sb-bsd-sockets.fas"
;;; Loading #P"/usr/lib/ecl-21.2.1/sockets.fas"
Maxima 5.45.1
>
On OS X, I don't even get this far: I see "Added 0 synonyms" and then it hangs. If I hit ctrl-C to interrupt it, Sage crashes.
The problem is not with
latex
:==>
giac
fails...BTW :
maxima
doesn't give an explicit expression of this integral : the result includes an'integrate
factor` (too long for a comment...).If you have
fricas
(you should...), use it.Could you please add this to the trac ticket (#33356)?