Re: [sage-devel] Re: QQbar(-1)^(1/3) != AA(-1)^(1/3)

2024-09-04 Thread Nils Bruin
On Tuesday 3 September 2024 at 23:53:33 UTC-7 john wrote: Indeed, Magma's AlgebraicallyClosedField is not embedded into CC; it also has no version of AA. And Nils meant what he said about large *finite* fields being used to keep track. I find QQbar easier to use -- but when Magma's Algebraica

Re: [sage-devel] Re: QQbar(-1)^(1/3) != AA(-1)^(1/3)

2024-09-04 Thread Kwankyu Lee
On Wednesday, September 4, 2024 at 1:41:30 PM UTC+9 Nils Bruin wrote: ... it may well depend on whether you're more algebraically or analytically oriented. Yes. That may be a way to reconcile the conflicting views. We may explicitly introduce technical distinction of "analytical fields" and "

Re: [sage-devel] Re: QQbar(-1)^(1/3) != AA(-1)^(1/3)

2024-09-04 Thread Oscar Benjamin
On Wed, 4 Sept 2024 at 11:06, Kwankyu Lee wrote: > > On Wednesday, September 4, 2024 at 1:41:30 PM UTC+9 Nils Bruin wrote: > > ... it may well depend on whether you're more algebraically or analytically > oriented. > > > Yes. That may be a way to reconcile the conflicting views. > > We may explic

[sage-devel] Mail etiquette: please don't quote all of the email you reply to unless needed

2024-09-04 Thread Georgi Guninski
I observe that a lot of users quote **everything** when replying. In plaintext the email looks like: TOP POST >X_1 wrote >>X_2 wrote >>>X_3 wrote >> >>>X_n wrote This wastes space and I believe is considered bad email etiquette. In some desktop GUI mail user agents or web Gmail

Re: [sage-devel] Re: QQbar(-1)^(1/3) != AA(-1)^(1/3)

2024-09-04 Thread Kwankyu Lee
ZZ and QQ live in their own worlds (sigh). sage: ZZ(8)^(1/3) 2 sage: ZZ(-8)^(1/3) 2*(-1)^(1/3) sage: ZZ(1)^(1/3) 1 sage: ZZ(-1)^(1/3) (-1)^(1/3) sage: QQ(8)^(1/3) 2 sage: QQ(-8)^(1/3) 2*(-1)^(1/3) sage: QQ(1)^(1/3) 1 sage: QQ(-1)^(1/3) (-1)^(1/3) >>> RR(ZZ(-8)^(1/3)) ... TypeError: unable to

[sage-devel] Memory leak in `NumberField().class_group().order()`

2024-09-04 Thread Georgi Guninski
Probably this shares the same bug as [1] Calling `NumberField().class_group().order()` in a loop of size N: #10^3 leaks: 40.03 MB 40026112 pari= [7950, 1451665] #10^4 leaks: 338.49 MB 338493440 pari= [83505, 19297360] The leak appears to be in the pari heap. Code .sage: #Author Georgi G

Re: [sage-devel] Re: QQbar(-1)^(1/3) != AA(-1)^(1/3)

2024-09-04 Thread Dima Pasechnik
On 4 September 2024 03:44:42 BST, Kwankyu Lee wrote: > > >On Wednesday, September 4, 2024 at 3:05:19 AM UTC+9 dim...@gmail.com wrote: > >On Tue, Sep 3, 2024 at 5:08 PM Kwankyu Lee wrote: >> >> >> That in Python one has non-real value for (-1)**(1/3) is >> two things: 1/3 is actually a floa

Re: [sage-devel] Mail etiquette: please don't quote all of the email you reply to unless needed

2024-09-04 Thread Bagas Sanjaya
On 9/4/24 17:46, Georgi Guninski wrote: I observe that a lot of users quote **everything** when replying. In plaintext the email looks like: TOP POST X_1 wrote X_2 wrote X_3 wrote X_n wrote This wastes space and I believe is considered bad email etiquette. In some desktop GUI mail

[sage-devel] Re: Memory leak in `NumberField().class_group().order()`

2024-09-04 Thread Marc Culler
I think that here you are seeing caching taking place, rather than a memory leak. This is what I tried: sage: import cypari2 sage: pari = cypari2.Pari() sage: def test(N): : for a in range(1, N): : K = NumberField(x^2+a, 'w') : m = K.class_group().order :

Re: [sage-devel] Re: Memory leak in |EllipticCurve([n,0]).root_number()| and problem in algebraic geometry

2024-09-04 Thread Marc Culler
On Monday, September 2, 2024 at 11:13:43 AM UTC-6 dima wrote: It appears that all these gunclone_deep() etc aren't documented in any proper way (and this is a root cause of this; same applies to memleaks we have in libsingular interface). Can you post a link to docs you are reading? I can only f

Re: [sage-devel] Re: QQbar(-1)^(1/3) != AA(-1)^(1/3)

2024-09-04 Thread Kwankyu Lee
>Now back in sage, sage chose to be compatible with python's behavior in >x^(1/3) for whatever x that represents a number in the complex field, say x >= -1, RR(-1), CC(-1), QQbar(-1). For x = ZZ(-1), QQ(-1), they chose to >return symbolic expression (-1)^(1/3), which again converted to the sa