--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/4c8b1e6b-d77c-47bf-a02f-03c39e2261aan%40googlegroups.com.
Le vendredi 31 mars 2023 à 15:19:51 UTC+2, William Stein a écrit :
[ Snip… ]
Meta comment -- I added this "Help me fix this..." feature to cocalc jupyter notebooks a week ago, and it's been extremelypopular with 1000+ uses a day. It's exactly the sort of thing that ChatGPT can be very helpful with, given that Sage typicaloutputs a massive scary stacktrace when anything goes wrong, and it's just a lot of mental effort to untangle it, especially giventhe preparser. ChatGPT is far from perfect, but it doesn't mind expending a lot of effort. People also often get stuck andvery frustrated with Sage due to silly little things, e.g., accidentally capitalizing a function name, and chatgpt instantly pointsout such things.You can reproduce the above exactly also at https://chat.openai.com/chat by using the prompt:"I ran the following SageMath 9.8 code:(put the code)and it produced the following error message:(put the error)Help me fix my code."However, I think people find seeing and error and just clicking once then seeing the result right in their notebook to be easier and lessdisruptive of flow than a bunch of copy/paste.
Very nice ! With the usual reservation to take chatGPT’s answers with a grain of salt (sometomes iceberg-sized) : chatGPT conjured out of …err.., thin air, a matrix log function in Sage, and a matrix log function in Sympy ; the latter is only partially false, since Sympy’s Matrixes do have methods exp and log, the former is just plain wrong.
Do you think such a feature could be added to the Jupyter/Jupyterlab versions included in Sage ?
Or possibly to Jupyter/Juyterlab (i. e. upstream) ?
Do you think such a feature could be added to the Jupyter/Jupyterlab versions included in Sage ?
Or possibly to Jupyter/Juyterlab (i. e. upstream) ?
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/54ebf451-4b23-4f53-a29c-6b3ab1e2a790n%40googlegroups.com.
PS: sorry in the last command "approx" should have been "sage_approx".
On Sat, 1 Apr 2023 at 11:35, Vincent Delecroix <20100.d...@gmail.com> wrote:
Dear Marcel,It is a pity that this does not work more directly. Here is a work around to achieve what you want to do
sage: exp = sympify("CRootOf(x**5 + x + 1, 0)")
sage: sage_poly = QQ['x'](list(map(QQ, reversed(exp.poly.rep.rep))))
sage: sage_approx = RIF(exp.n()) + RIF(-1e-30, 1e-30)
sage: QQbar.polynomial_root(sage_poly, approx)
-0.7548776662466928?BestVincent
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/4987d26b-300c-46b8-bcd0-2bb0456713f2n%40googlegroups.com.
Dear Marcel,It is a pity that this does not work more directly. Here is a work around to achieve what you want to dosage: exp = sympify("CRootOf(x**5 + x + 1, 0)")
sage: sage_poly = QQ['x'](list(map(QQ, reversed(exp.poly.rep.rep))))
sage: sage_approx = RIF(exp.n()) + RIF(-1e-30, 1e-30)
sage: QQbar.polynomial_root(sage_poly, approx)
-0.7548776662466928?BestVincent
On Fri, 31 Mar 2023 at 19:12, Marcel Moosbrugger <marcelmo...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/4987d26b-300c-46b8-bcd0-2bb0456713f2n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/4987d26b-300c-46b8-bcd0-2bb0456713f2n%40googlegroups.com.