Re: [sage-support] sage with python3, mpmath

2020-01-15 Thread Александр Ватузов
I mean "default". type(5) f.e. среда, 15 января 2020 г., 16:15:08 UTC+3 пользователь Dima Pasechnik написал: > > On Wed, Jan 15, 2020 at 1:10 PM Александр Ватузов > wrote: > > > > As I undestand, sage uses custom int > > no, Sage's int is the same as Python's int. But Sage has other integer

Re: [sage-support] sage with python3, mpmath

2020-01-15 Thread Dima Pasechnik
On Wed, Jan 15, 2020 at 1:10 PM Александр Ватузов wrote: > > As I undestand, sage uses custom int no, Sage's int is the same as Python's int. But Sage has other integer types, e.g. ZZ. > > среда, 15 января 2020 г., 12:22:51 UTC+3 пользователь Dima Pasechnik написал: >> >> On Tue, Jan 14, 2020 at

Re: [sage-support] sage with python3, mpmath

2020-01-15 Thread Александр Ватузов
As I undestand, sage uses custom int среда, 15 января 2020 г., 12:22:51 UTC+3 пользователь Dima Pasechnik написал: > > On Tue, Jan 14, 2020 at 10:23 PM Nils Bruin > > wrote: > > > > On Tuesday, January 14, 2020 at 5:36:27 AM UTC-8, Александр Ватузов > wrote: > >> > >> Now I constantly know,

Re: [sage-support] sage with python3, mpmath

2020-01-15 Thread Dima Pasechnik
On Tue, Jan 14, 2020 at 10:23 PM Nils Bruin wrote: > > On Tuesday, January 14, 2020 at 5:36:27 AM UTC-8, Александр Ватузов wrote: >> >> Now I constantly know, that problem was in using >> >> divmod(n, base**half) >> >> instead of >> >> n // (base**half), n % (base**half) > > > The second option yi

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
yes, but it is function that translates numbers into strings, don't need such optimizations среда, 15 января 2020 г., 1:23:36 UTC+3 пользователь Nils Bruin написал: > > On Tuesday, January 14, 2020 at 5:36:27 AM UTC-8, Александр Ватузов wrote: >> >> Now I constantly know, that problem was in usin

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Nils Bruin
On Tuesday, January 14, 2020 at 5:36:27 AM UTC-8, Александр Ватузов wrote: > > Now I constantly know, that problem was in using > > divmod(n, base**half) > > instead of > > n // (base**half), n % (base**half) > The second option yields a performance regression relative to the first, because you w

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread John H Palmieri
On line 158, in the function "numerical_python", I see A, B = divmod(n, base**half) On Tuesday, January 14, 2020 at 11:54:21 AM UTC-8, Александр Ватузов wrote: > > and what is on mpmath file, analog of > "/SageMath/local/lib/python3.7/site-packages/mpmath/libmp/libintmath.py", > line 1

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
and what is on mpmath file, analog of "/SageMath/local/lib/python3.7/site-packages/mpmath/libmp/libintmath.py", line 161 ? Just interesting :) вторник, 14 января 2020 г., 21:20:05 UTC+3 пользователь John H Palmieri написал: > > Sorry, I meant Sage *9.1.beta0*. > > On Tuesday, January 14, 2020 a

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread John H Palmieri
Sorry, I meant Sage *9.1.beta0*. On Tuesday, January 14, 2020 at 10:18:41 AM UTC-8, John H Palmieri wrote: > > Just to confirm: everything works with Sage 9.0.beta1, built with Python > 2. Fails with Sage built with Python 3. > > > On Tuesday, January 14, 2020 at 5:55:51 AM UTC-8, Александр Ватуз

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread John H Palmieri
Just to confirm: everything works with Sage 9.0.beta1, built with Python 2. Fails with Sage built with Python 3. On Tuesday, January 14, 2020 at 5:55:51 AM UTC-8, Александр Ватузов wrote: > > https://trac.sagemath.org/ticket/29009#ticket > > вторник, 14 января 2020 г., 16:36:27 UTC+3 пользовател

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
https://trac.sagemath.org/ticket/29009#ticket вторник, 14 января 2020 г., 16:36:27 UTC+3 пользователь Александр Ватузов написал: > > Now I constantly know, that problem was in using > > divmod(n, base**half) > > instead of > > n // (base**half), n % (base**half) > > on File > "/home/nouret/SageM

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
Now I constantly know, that problem was in using divmod(n, base**half) instead of n // (base**half), n % (base**half) on File "/home/nouret/SageMath/local/lib/python3.7/site-packages/mpmath/libmp/libintmath.py", line 161, in numeral_python вторник, 14 января 2020 г., 15:42:17 UTC+3 пользова

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
.Copy mpmath from build-in python3.6.9 to sage python3.7.3 doesn't help, can divmod function change?.. вторник, 14 января 2020 г., 15:42:17 UTC+3 пользователь Dima Pasechnik написал: > > On Tue, Jan 14, 2020 at 12:37 PM Александр Ватузов > wrote: > > > > I haven-fount where report bug on that

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Dima Pasechnik
On Tue, Jan 14, 2020 at 12:37 PM Александр Ватузов wrote: > > I haven-fount where report bug on that site... > you open a new ticket: https://trac.sagemath.org/newticket - you'd need either a Guthub account, or a local account (long time to get sometimes) to authenticate. > Now I will try to rep

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
I haven-fount where report bug on that site... Now I will try to repair smth: I have 2 dirs: SageMath/local/lib/python3.7/site-packages/mpmath .local/lib/python3.6/site-packages/mpmath I think there are sima chenges here вторник, 14 января 2020 г., 14:57:31 UTC+3 пользователь Dima Pasechnik на

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
yes, I'll do it вторник, 14 января 2020 г., 14:57:31 UTC+3 пользователь Dima Pasechnik написал: > > On Tue, Jan 14, 2020 at 11:53 AM Александр Ватузов > wrote: > > > > Will you open issue here? https://trac.sagemath.org/ > > I can't reproduce the issue with a system python 3.7.3, so it deserv

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Dima Pasechnik
On Tue, Jan 14, 2020 at 11:53 AM Александр Ватузов wrote: > > Will you open issue here? https://trac.sagemath.org/ I can't reproduce the issue with a system python 3.7.3, so it deserves a trac ticket. Can you open one? > > Or I can try to do something > > вторник, 14 января 2020 г., 14:08:08 UTC

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
Will you open issue here? https://trac.sagemath.org/ Or I can try to do something вторник, 14 января 2020 г., 14:08:08 UTC+3 пользователь Dima Pasechnik написал: > > I have opened https://github.com/fredrik-johansson/mpmath/issues/503 > to report this. > > On Tue, Jan 14, 2020 at 10:59 AM Eric

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
sory, this I had reported :) вторник, 14 января 2020 г., 13:59:50 UTC+3 пользователь Eric Gourgoulhon написал: > > PS: a similar error has been reported on ask.sagemath: > https://ask.sagemath.org/question/49534/error-with-mpmathfindroot-on-89/ > > Le mardi 14 janvier 2020 11:55:08 UTC+1, Eric G

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Dima Pasechnik
I have opened https://github.com/fredrik-johansson/mpmath/issues/503 to report this. On Tue, Jan 14, 2020 at 10:59 AM Eric Gourgoulhon wrote: > > PS: a similar error has been reported on ask.sagemath: > https://ask.sagemath.org/question/49534/error-with-mpmathfindroot-on-89/ > > Le mardi 14 janv

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Dima Pasechnik
It could be Python3, indeed. I see, on "pure" sage 9.0 python3: >>> import mpmath >>> mpmath.mp.prec = 1000 #on 700 all is ok >>> mpmath.findroot(lambda x: x**2 - 3, 2) # must use ** for exponentiation - >>> pure Python OverflowError: Python int too large to convert to C long The above exception

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Eric Gourgoulhon
PS: a similar error has been reported on ask.sagemath: https://ask.sagemath.org/question/49534/error-with-mpmathfindroot-on-89/ Le mardi 14 janvier 2020 11:55:08 UTC+1, Eric Gourgoulhon a écrit : > > Le mardi 14 janvier 2020 11:36:44 UTC+1, Dima Pasechnik a écrit : >> >> >> mpmath version on Sage

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Eric Gourgoulhon
Le mardi 14 janvier 2020 11:36:44 UTC+1, Dima Pasechnik a écrit : > > > mpmath version on Sage 8.6 is 1.0.0, and later and now it is 1.1.0 > > This might explain the problem, which maybe should be reported upstream: > > https://github.com/fredrik-johansson/mpmath > > It's OK with Sage 8.9, whic

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Dima Pasechnik
On Tue, Jan 14, 2020 at 10:18 AM Jan Groenewald wrote: > > Hi > > On Tue, 14 Jan 2020 at 12:11, Александр Ватузов wrote: >> >> I have a problem with sage on python3, example sage9.0 >> >> simple code: >> >> import mpmath >> mpmath.mp.prec = 1000 #on 700 all is ok >> mpmath.findroot(lambda x: x^2

Re: [sage-support] sage with python3, mpmath

2020-01-14 Thread Jan Groenewald
Hi On Tue, 14 Jan 2020 at 12:11, Александр Ватузов wrote: > I have a problem with sage on python3, example sage9.0 > > simple code: > > import mpmath > mpmath.mp.prec = 1000 #on 700 all is ok > mpmath.findroot(lambda x: x^2 - 3, 2) > > error: > ) failed: > SystemError: returned a result with an

[sage-support] sage with python3, mpmath

2020-01-14 Thread Александр Ватузов
I have a problem with sage on python3, example sage9.0 simple code: import mpmath mpmath.mp.prec = 1000 #on 700 all is ok mpmath.findroot(lambda x: x^2 - 3, 2) error: ) failed: SystemError: returned a result with an error set> Somebody else has this error? I will check on simple mpmath. --