Re: [sage-devel] Re: specification of __bool__

2022-09-27 Thread 'Martin R' via sage-devel
OK. On Tuesday, 27 September 2022 at 17:50:04 UTC+2 David Roe wrote: > Nils put it well; please don't change __bool__ for p-adic and power > series. It should be compatible with equality testing. > David > > On Tue, Sep 27, 2022 at 11:44 AM Nils Bruin wrote: > >> It seems attractive that for n

Re: [sage-devel] Re: specification of __bool__

2022-09-27 Thread David Roe
Nils put it well; please don't change __bool__ for p-adic and power series. It should be compatible with equality testing. David On Tue, Sep 27, 2022 at 11:44 AM Nils Bruin wrote: > It seems attractive that for numerical types, bool(a) gives that same > result as "not(a==0)", which would hopefu

[sage-devel] Re: specification of __bool__

2022-09-27 Thread Nils Bruin
It seems attractive that for numerical types, bool(a) gives that same result as "not(a==0)", which would hopefully be the same as "a!=0". It is definitely the case that O(t^5) == 0 is a lot more useful for computations. For instance, with that in place, Gaussian elimination will actually sort-o