latex() command makes sage 9.5 coredump. Any workaround?

asked 2022-02-15 22:28:43 +0100

Nasser gravatar image

updated 2022-02-15 22:36:18 +0100

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
>

https://trac.sagemath.org/ticket/3335...

edit retag flag offensive close merge delete

Comments

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.

John Palmieri gravatar imageJohn Palmieri ( 2022-02-16 01:59:41 +0100 )edit

The problem is not with latex :

sage: integrate(1/(1+cos(x)^5),x)
// 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

Process Sage exited abnormally with code 139

==> giac fails...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2022-02-16 09:00:02 +0100 )edit

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.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2022-02-16 09:56:02 +0100 )edit

Could you please add this to the trac ticket (#33356)?

John Palmieri gravatar imageJohn Palmieri ( 2022-02-16 18:02:05 +0100 )edit