Re: exp2(3) bug?

2014-06-02 Thread Benjamin Baier
You might want to read up on floating point arithmetic. (rounding and representation) On 06/02/14 05:13, Daniel Dickman wrote: I hit this problem while working with the numpy 1.8.1 regress suite which has some tests that are currently failing. Here is a reduced test case of the logaddexp2

Re: exp2(3) bug?

2014-06-02 Thread Mark Kettenis
Date: Mon, 02 Jun 2014 09:34:20 +0200 From: Benjamin Baier program...@netzbasis.de You might want to read up on floating point arithmetic. (rounding and representation) Well, the difference between 4.994404 and 5.0 is a bit large to blame rounding and binary representation. And other

Re: exp2(3) bug?

2014-06-02 Thread Benjamin Baier
Ok i might have been quick to judge, because i don't really trust floating point arithmetic. btw. exp2f works correct on i386. On 06/02/14 10:17, Mark Kettenis wrote: Date: Mon, 02 Jun 2014 09:34:20 +0200 From: Benjamin Baier program...@netzbasis.de You might want to read up on floating

Re: exp2(3) bug?

2014-06-02 Thread Mark Kettenis
Date: Mon, 2 Jun 2014 10:17:53 +0200 (CEST) From: Mark Kettenis mark.kette...@xs4all.nl Date: Mon, 02 Jun 2014 09:34:20 +0200 From: Benjamin Baier program...@netzbasis.de You might want to read up on floating point arithmetic. (rounding and representation) Well, the difference

Re: exp2(3) bug?

2014-06-02 Thread Daniel Dickman
Hi Benjamin, On Mon, Jun 2, 2014 at 3:34 AM, Benjamin Baier program...@netzbasis.de wrote: You might want to read up on floating point arithmetic. (rounding and representation) The error in floating point calculations is typically measured in ulps. The error shown in this example is far too

Re: exp2(3) bug?

2014-06-02 Thread Daniel Dickman
On Mon, Jun 2, 2014 at 5:33 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Mon, 2 Jun 2014 10:17:53 +0200 (CEST) From: Mark Kettenis mark.kette...@xs4all.nl Date: Mon, 02 Jun 2014 09:34:20 +0200 From: Benjamin Baier program...@netzbasis.de You might want to read up on floating

Re: exp2(3) bug?

2014-06-02 Thread Martynas Venckus
On 6/2/14, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Mon, 2 Jun 2014 10:17:53 +0200 (CEST) From: Mark Kettenis mark.kette...@xs4all.nl Date: Mon, 02 Jun 2014 09:34:20 +0200 From: Benjamin Baier program...@netzbasis.de You might want to read up on floating point arithmetic.