Re: [sage-support] Re: How to convert complex_root_of to QQbar (algebraic number)

2023-04-04 Thread Marcel Moosbrugger
Thank you all for your help! I got the same error as William, but it pointed me into the right direction. I found a way how to get the unique bounding interval of the root in sympy and convert this interval to a sage interval. It is not the prettiest solution but the following works for me:

Re: [sage-support] How to use Gap interface for permutation groups?

2023-04-04 Thread Hongyi Zhao
On Friday, March 31, 2023 at 1:38:47 AM UTC+8 Dima Pasechnik wrote: On Thu, 30 Mar 2023, 18:25 'Peter Mueller' via sage-support, < sage-s...@googlegroups.com> wrote: When working with finite permutation groups, it seems to me that one has the choice to either use the groups as sage objects

Re: [sage-support] Re: How to convert complex_root_of to QQbar (algebraic number)

2023-04-04 Thread vdelecroix
Indeed, 1e-30 is too precise. Changing to 1e-10 makes it work. The solution at https://github.com/sagemath/sage/pull/35414 is more robust. Le samedi 1 avril 2023 à 21:21:05 UTC+2, William Stein a écrit : > Thanks Vincent! What version of Sage are you using? With sage-9.8 I get: > > --- > > from

Re: [sage-support] Re: How to convert complex_root_of to QQbar (algebraic number)

2023-04-04 Thread vdelecroix
Indeed. Sorry. One needs to take a larger error sage_approx = RIF(exp.n()) + RIF(-1e-10, 1e-10) Not the best way to proceed. The solution at https://github.com/sagemath/sage/pull/35414 should be be more robust. Le samedi 1 avril 2023 à 21:21:05 UTC+2, William Stein a écrit : > Thanks Vincent!

Re: [sage-support] Re: How to convert complex_root_of to QQbar (algebraic number)

2023-04-04 Thread vdelecroix
Indeed, one has to increase the error to make it work sage_approx = RIF(exp.n()) + RIF(-1e-10, 1e-10) This is not the smartest way to proceed. Le samedi 1 avril 2023 à 21:21:05 UTC+2, William Stein a écrit : > Thanks Vincent! What version of Sage are you using? With sage-9.8 I get: > > --- > >

Re: [sage-support] How to use Gap interface for permutation groups?

2023-04-04 Thread John H Palmieri
In lengthy code, you could start with a line like OnSets = libgap.OnSets and then in the rest of the code, you could do `g.Stabilizer([1,2], OnSets)`. That is, predefine whatever you want from libgap, giving each item a meaningful name, and then use that name in the rest of the code. On

Re: [sage-support] How to use Gap interface for permutation groups?

2023-04-04 Thread Hongyi Zhao
On Wednesday, April 5, 2023 at 2:49:39 AM UTC+8 John H Palmieri wrote: In lengthy code, you could start with a line like OnSets = libgap.OnSets and then in the rest of the code, you could do `g.Stabilizer([1,2], OnSets)`. That is, predefine whatever you want from libgap, giving each item a

[sage-support] gap.console() calling problem.

2023-04-04 Thread Hongyi Zhao
See my following testing: Method 1: This works: sage: import sage.interfaces.gap sage: sage.interfaces.gap.gap_cmd = "~/.local/bin/gap" sage: gap.console() Method 2: This fails: sage: import sage.interfaces.gap as gap sage: gap.gap_cmd="~/.local/bin/gap" sage: gap.console()