I'm surprised that this hasn't been reported previously, because we can get a crash even without atan or any division:
sin( x*(x+1) - x^2 - x ) # this crashes sage This also crashes with sinh or cos or tan in the place of sin, but not with exp or log. PS I verified on CoCalc that this is not a new bug: this crashes version 9.1. On Monday, May 29, 2023 at 5:51:28 PM UTC-6 Nils Bruin wrote: > Localized a bit further: > > var("q A") > p = A*(1+1/A)-A-1 > V=(q^p)._maxima_().rectform() > > after this, V._sage_() crashes, and I think it's the same crash as above. > > Transcribing what V is in maxima, we get: > > > I*sin(atan2(0,q)*((1/A+1)*A-A-1))*abs(q)^((1/A+1)*A-A-1)+cos(atan2(0,q)*((1/A+1)*A-A-1))*abs(q)^((1/A+1)*A-A-1) > > which indeed causes a crash when input directly into sage. More simply: > > var("q A") > U=atan2(0,q)*((1/A+1)*A-A-1) > sin(U) #this crashes > > It looks like an infinite recursion, so probably the constructor (of sin?) > tries to do some simplification, which ends up trying to construct the same > expression again. The traceback implicates Pynac. > > > On Monday, 29 May 2023 at 13:07:50 UTC-7 dwb...@gmail.com wrote: > >> I was shown the following way of getting a segmentation fault in Sage. >> >> sage: var("q A") >> sage: p = A*(1+1/A)-A-1 >> sage: (q^p).full_simplify() >> >> This consistently causes a crash. The person who found it was doing some >> actual work, got a crash, and boiled it down to a minimal example. >> >> Daniel Bump >> > -- 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 sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/a308677c-a2b7-4391-b77a-78225a480419n%40googlegroups.com.