[sage-devel] Re: RealField isn't doing it right

2023-04-15 Thread Nils Bruin
On Saturday, 15 April 2023 at 14:39:40 UTC-7 aw wrote: Here's one: RealField(200)(2*1.1) 2.20017763568394002504646778106689453125 Let's check the types: type(2) type(1.1) type(2*1.1) The type on that last result gives you a hint that something has changed by

Re: [sage-devel] RealField isn't doing it right

2023-04-15 Thread Nils Bruin
On Saturday, 15 April 2023 at 16:25:27 UTC-7 Michael Orlitzky wrote: sage: A = matrix([[-3, 2, 1 ], : [ 2,-4, 4 ], : [ 1, 2,-5 ]]) sage: B = (2 * 0.5 * A) sage: B == A True sage: B.rank() == A.rank() False I promise you that I know what a floating point number is, and that they

Re: [sage-devel] RealField isn't doing it right

2023-04-15 Thread Michael Orlitzky
On Sat, 2023-04-15 at 16:56 -0700, William Stein wrote: > > I agree with you that it's best to assume that the original poster "aw" does > understand the semantics of floating point numbers in Sage, and just doesn't > like them. I think you also understand the semantics of floating point in >

Re: [sage-devel] RealField isn't doing it right

2023-04-15 Thread Oscar Benjamin
On Sat, 15 Apr 2023 at 22:39, aw wrote: > >A user should be able to send any argument to a function, and it's the >responsibility of the programmer to make sure one of two things happen: > > (a) the user is given the right answer; > or (b) the user is given no answer and an error message. That

Re: [sage-devel] RealField isn't doing it right

2023-04-15 Thread William Stein
On Sat, Apr 15, 2023 at 4:25 PM Michael Orlitzky wrote: > > On Sat, 2023-04-15 at 18:20 -0400, David Roe wrote: > > I agree with William that you should refrain from insulting the Sage > > developers, especially when the underlying problem comes from your > > misunderstanding of how floating

Re: [sage-devel] RealField isn't doing it right

2023-04-15 Thread Michael Orlitzky
On Sat, 2023-04-15 at 18:20 -0400, David Roe wrote: > I agree with William that you should refrain from insulting the Sage > developers, especially when the underlying problem comes from your > misunderstanding of how floating point arithmetic works. I was given this response many times, and I

Re: [sage-devel] RealField isn't doing it right

2023-04-15 Thread David Roe
I agree with William that you should refrain from insulting the Sage developers, especially when the underlying problem comes from your misunderstanding of how floating point arithmetic works. To respond to the content of your message, finite precision real fields in Sage are implemented using

Re: [sage-devel] RealField isn't doing it right

2023-04-15 Thread William Stein
https://github.com/sagemath/sage/blob/develop/CODE_OF_CONDUCT.md On Sat, Apr 15, 2023 at 2:39 PM aw wrote: > > Guys, this is serious. Any dev who starts reading this, give it a hard look, > ok? > > Below I give some examples where Sage give the wrong answer, with no error > message or any

[sage-devel] RealField isn't doing it right

2023-04-15 Thread aw
Guys, this is serious. Any dev who starts reading this, give it a hard look, ok? Below I give some examples where Sage give the wrong answer, with no error message or any indication that the answer is not correct. Probably the single most important rule in software is, never ever give users