# [sage-devel] Re: SIGSEGV in Maxima

```seems to me that asking for the "sign" of b^(1/3) in the complex domain
is nonsense.  There are 3 cube roots.  Let q be one of them; it doesn't
matter which.
then  - (1+sqrt(3)*i)*q/2    are the other two.  Yes, two.  because there
are two sqrt(3).```
```
If you cannot deal with all 3 of them in Sage, then you have a problem
in Sage, regardless of whether asking Maxima for a "sign" leads to
an error.
I think that if Sage requires the power of cylindrical algebraic
decomposition,
which such questions seem to require, then calling Maxima, which does
not have that programmed, is an inadequate step in whatever you
are trying to do,.

Good luck
RJF

On Thursday, August 10, 2017 at 11:37:47 AM UTC-7, Richard_L wrote:
>
> The following string sent to maxima causes a seg-fault and core dump:
>
> >
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py(452)_eval_line()
>     450                     line = line[ind_semi+1:]
>     451                 if statement:
> 2-> 452                     result = ((result + '\n') if result else '') +
> max_to_string(maxima_eval("#\$%s\$"%statement))
>     453             else:
>     454                 statement = line[:ind_dollar]
>
> ipdb> p "#\$%s\$"%statement
> '#\$is
> (equal(-(_SAGE_VAR_r13^2*_SAGE_VAR_r23-_SAGE_VAR_r23^3)/((-_SAGE_VAR_r23^4)+2*_SAGE_VAR_r13^2*_SAGE_VAR_r23^2-_SAGE_VAR_r13^4+_SAGE_VAR_r12^4),0))\$'
> ipdb> s
>
>
> ;;;
> ;;; Detected access to protected memory, also kwown as 'bus or
> segmentation fault'.
> ;;; Jumping to the outermost toplevel prompt
> ;;;
>
>  ... [elided]
>
> Segmentation fault (core dumped)
>
> NOTE 1: The line numbering corresponds to SageMath version 8.0 and
> Maxima-5.40.0.
>            I observe the same behavior with Maxima-5.39.0 but did not
> trace.
>
> NOTE 2: Not visible in the ipdb session are the declarations of the
> variables. So, in addition to the ipdb session, I attach the .sage source.
>

--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to sage-devel@googlegroups.com.