Re: [Numpy-discussion] Guidelines for floating point comparison

2021-02-24 Thread Ilhan Polat
Matrix powers are annoyingly tricky to keep under control due to the fact that things to explode or implode rather quickly. In fact the famous quote from Moler, Van Loan "Unfortunately, the roundoff errors in the mth power of a matrix, say B^m ,are usually small relative to ||B||^m rather than ||B^

Re: [Numpy-discussion] C-coded dot 1000x faster than numpy?

2021-02-24 Thread Neal Becker
Supposedly can control through env variables but I didn't see any effect On Wed, Feb 24, 2021, 10:12 AM Charles R Harris wrote: > > > On Wed, Feb 24, 2021 at 8:02 AM Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Wed, Feb 24, 2021 at 5:36 AM Neal Becker wrote: >> >>> See m

Re: [Numpy-discussion] C-coded dot 1000x faster than numpy?

2021-02-24 Thread Charles R Harris
On Wed, Feb 24, 2021 at 8:02 AM Charles R Harris wrote: > > > On Wed, Feb 24, 2021 at 5:36 AM Neal Becker wrote: > >> See my earlier email - this is fedora 33, python3.9. >> >> I'm using fedora 33 standard numpy. >> ldd says: >> >> /usr/lib64/python3.9/site-packages/numpy/core/_ >> multiarray_um

Re: [Numpy-discussion] C-coded dot 1000x faster than numpy?

2021-02-24 Thread Charles R Harris
On Wed, Feb 24, 2021 at 5:36 AM Neal Becker wrote: > See my earlier email - this is fedora 33, python3.9. > > I'm using fedora 33 standard numpy. > ldd says: > > /usr/lib64/python3.9/site-packages/numpy/core/_ > multiarray_umath.cpython-39-x86_64-linux-gnu.so: > linux-vdso.so.1 (0x7ffdd148700

Re: [Numpy-discussion] Guidelines for floating point comparison

2021-02-24 Thread Kevin Sheppard
In my experience it is most common to use reasonable but not exceedingly tight bounds in complex applications where there isn’t a proof that the maximum error must be smaller than some number.  I would also caution against using a single system to find the tightest tolerance a test passes at.  For

Re: [Numpy-discussion] C-coded dot 1000x faster than numpy?

2021-02-24 Thread Neal Becker
See my earlier email - this is fedora 33, python3.9. I'm using fedora 33 standard numpy. ldd says: /usr/lib64/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-x86_64-linux-gnu.so: linux-vdso.so.1 (0x7ffdd1487000) libflexiblas.so.3 => /lib64/libflexiblas.so.3 (0x7f0512787000

Re: [Numpy-discussion] Guidelines for floating point comparison

2021-02-24 Thread Ralf Gommers
On Wed, Feb 24, 2021 at 11:29 AM Bernard Knaepen wrote: > Hi all, > > We are developing a code that heavily relies on NumPy. Some of our > regression tests rely on floating point number comparisons and we are a bit > lost in determining how to choose atol and rtol (we are trying to do all > opera

[Numpy-discussion] Guidelines for floating point comparison

2021-02-24 Thread Bernard Knaepen
Hi all, We are developing a code that heavily relies on NumPy. Some of our regression tests rely on floating point number comparisons and we are a bit lost in determining how to choose atol and rtol (we are trying to do all operations in double precision). We would like to set atol and rtol as