Georg Baum wrote: > Pavel Sanda wrote: > > > Georg Baum wrote: > >> No, but I believe I know the reason: self made rounding in combination > >> with optimization (I created the test reference with a debug build). > >> Which compiler switches do you use? > > > > -Wall -Wextra -std=c++11 -g -O2 -Wno-deprecated-declarations > > I cannot reproduce using these flags with gcc 4.9.2.
Shouldn't matter IMHO, but running 32 bit here. > >> I will have a look at this after the beta. My usual procedure is to use > >> the standard C99 function lround() for rounding, but MSVC10 does not have > >> it. Does it work with the attached patch? > > > > The attached patch fixed the problem. > > Good. I reworked it a little bit, since we have the same problem at other > places as well. Apart from that, the patch does also fix the rounding in > Length::inBP() for negative lengths. > > Pavel, does it still fix the test for you? If yes, is it OK to go in? Yes. You have my +1, though I must admit I don't understand why it works, 0.5 should be perfectly representable in binary so +0.5 trick should have worked. Pavel