[sage-devel] Re: bug in realfield when passing python integers

2023-04-10 Thread Nils Bruin
On Monday, 10 April 2023 at 13:11:15 UTC-7 aw wrote: [...] print(RR(n1/n2))#passing as 8059,9042 as python ints print(RR(8059/9042)) #passing 8059,9042 as sage ints [...] this bug is trivial to fix when ints are passed to realfield, they should be automatically cast to sage

[sage-devel] Re: bug in realfield when passing float literals

2023-04-10 Thread John H Palmieri
"2*1.1" is not a float literal. Note that RR(2.2) does what you want. On Monday, April 10, 2023 at 1:42:21 PM UTC-7 aw wrote: > sage version: 9.4 > operating system: fedora 35 > > float literals passed to realfield can yield wrong answers > > example: > > RR=RealField(200) > > print(RR(1.1)) >

[sage-devel] bug in realfield when passing float literals

2023-04-10 Thread aw
sage version: 9.4 operating system: fedora 35 float literals passed to realfield can yield wrong answers example: RR=RealField(200) print(RR(1.1)) print(RR(11/10)) print() print(RR(2*1.1)) print(RR(2*11/10)) output: 1.10

Re: [sage-devel] bug in realfield when passing python integers

2023-04-10 Thread David Roe
I don't think this is a bug that Sage can fix. When you execute RR(8059/9042) in Python, it first evaluates 8059/9042 which produces a float, then passes that to RR. There's no way for RR to know that you initially input a ratio of ints. David On Mon, Apr 10, 2023 at 4:11 PM aw wrote: > when

[sage-devel] bug in realfield when passing python integers

2023-04-10 Thread aw
when passing python ints to realfield, they don't get cast to sage integers this can cause wrong answers example: RR=RealField(100) set_random_seed(3) n1=randint(1000,)#n1=8059 n2=randint(1000,)#n2=9042 print(n1,'/',n2,'=',sep='') print(RR(n1/n2))#passing as

[sage-devel] Re: Sage developer's guide

2023-04-10 Thread seb....@gmail.com
This PR is ready for review, now! Kwankyu Lee schrieb am Mittwoch, 5. April 2023 um 10:28:22 UTC+2: It seems like that banner could be updated a bit, now that it is April. I do realize that there's still a lot being hashed out about the exact workflow... It seems that the workflow is still