On Tuesday, September 15, 2020 at 3:20:13 PM UTC-4 Emmanuel Charpentier wrote:
> sage: L[1].n() > > fails because L1 is an equation, i. e a symbolic expression whose operator > is the built-in “eq”, which has no n() method. > > However, > > sage: PP=-625/1000*t^4 + 2355/100*t^3 - 264051/1000*t^2 + 10269/10*t - 8538/10 > sage: PP.parent() > Symbolic Ring > sage: L=solve(PP,t) > sage: L[1].rhs().n() > 6.66465694043241 + 1.07289603917368e-15*I > > In particular, L[1].rhs() is the thing you wanted. rhs is "right-hand side". In principle, we should be able to use gp.solve (though you are right that the syntax is not valid Python), but I couldn't figure out how to get it to work that way. However, there is this alternate: sage: gp.eval("solve(t=10,30,%s)"%PP) '21.364877203764406090765850667689038180' where we are sort of abusing the string manipulation to just do it directly in Sage's copy of gp. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/51ca9447-4197-42eb-96d1-cfea5b3242een%40googlegroups.com.