Re: Float point issue

2011-10-28 Thread Robert Dewar
On 10/28/2011 12:35 AM, Zoltán Kócsi wrote: On Thu, 27 Oct 2011 23:31:14 -0400 Robert Dewarde...@adacore.com wrote: - I am missing a gcc flag probably you should avoid extra precision and all the issues it brings, as well as speed up your program, by using SSE 64-bit arithmetic (using the

Float point issue

2011-10-27 Thread Zoltán Kócsi
I found something very strange, although it might be just a misunderstanding. As far as I know, the IEEE-754 standard defines round-to-nearest, tie-to-even as follows: - For rounding purposes, the operation must be performed as if it were done with infinite precision - Then, if the bit right

Re: Float point issue

2011-10-27 Thread Robert Dewar
On 10/27/2011 10:17 PM, Zoltán Kócsi wrote: I wonder whether - I know the IEEE rounding rules incorrectly yes, you do, but you are ignoring the extended precision phenomenon which can lead to double rounding - I am missing a gcc flag probably you should avoid extra precision and all the

Re: Float point issue

2011-10-27 Thread Zoltán Kócsi
On Thu, 27 Oct 2011 23:31:14 -0400 Robert Dewar de...@adacore.com wrote: - I am missing a gcc flag probably you should avoid extra precision and all the issues it brings, as well as speed up your program, by using SSE 64-bit arithmetic (using the appropriate gcc flags) Indeed. -mpc64