Re: [Development] Comparing two reals in Qt code

2012-12-08 Thread Alan Alpert
That sounds more like a bug in a particular usecase than a general problem of float rounding. If we fixed the anchors so that width didn't change on a left/right anchored item in this circumstance, would that be enough? -- Alan Alpert On Fri, Dec 7, 2012 at 8:33 AM, Dominik Holland wrote: > Hi,

Re: [Development] Comparing two reals in Qt code

2012-12-07 Thread Dominik Holland
Hi, it took some time to get the code simple, but here is is a little example code: import QtQuick 1.0 Rectangle { id: root width: 360 height: 360 Item { id: item width: 50 height: 50 Rectangle { id: rect anch

Re: [Development] Comparing two reals in Qt code

2012-12-02 Thread Samuel Rødal
On 11/29/2012 03:01 PM, Dominik Holland wrote: > Hi all, > > last month i had some performance problems on a QML animation running on > low end hardware (imx233). > I debugged that problem and it was caused because of rounding errors > during the comparison of two reals. What kind of QML code lead

Re: [Development] Comparing two reals in Qt code

2012-12-02 Thread Dominik Holland
Hi, can we please go back to the initial question of whether it is worth the effort to use a more robust way of real comparison in qquickitem ? Dominik P.S.: I'm aware of it that how we compare the reals is also important, but that's not the aim of that mail On 11/30/2012 01:36 PM, Samuel Rød

Re: [Development] Comparing two reals in Qt code

2012-11-30 Thread Samuel Rødal
On 11/30/2012 09:51 AM, Jedrzej Nowacki wrote: > On Friday 30. November 2012 09.23.32 Samuel Rødal wrote: >> Yep, having something similar to AlmostEqualUlpsAndAbs() would be great. >> I've had some ideas of making qFuzzyCompare work that way in the past, >> but gave them up due to not wanting to r

Re: [Development] Comparing two reals in Qt code

2012-11-30 Thread Jedrzej Nowacki
On Friday 30. November 2012 09.23.32 Samuel Rødal wrote: > Yep, having something similar to AlmostEqualUlpsAndAbs() would be great. > I've had some ideas of making qFuzzyCompare work that way in the past, > but gave them up due to not wanting to risk subtly breaking a lot of > existing code. Introd

Re: [Development] Comparing two reals in Qt code

2012-11-30 Thread Samuel Rødal
On 11/29/2012 07:38 PM, Sean Harmer wrote: > On 29/11/2012 18:34, BRM wrote: >>> From: Alan Alpert <4163654...@gmail.com> >>> Sent: Thursday, November 29, 2012 11:52 AM >>> Subject: Re: [Development] Comparing two reals in Qt code >>> >>&g

Re: [Development] Comparing two reals in Qt code

2012-11-29 Thread Sean Harmer
On 29/11/2012 18:34, BRM wrote: >> From: Alan Alpert <4163654...@gmail.com> >> Sent: Thursday, November 29, 2012 11:52 AM >> Subject: Re: [Development] Comparing two reals in Qt code >> >> On Thu, Nov 29, 2012 at 6:53 AM, Sean Harmer wrote: >>>

Re: [Development] Comparing two reals in Qt code

2012-11-29 Thread BRM
> From: Alan Alpert <4163654...@gmail.com> > Sent: Thursday, November 29, 2012 11:52 AM > Subject: Re: [Development] Comparing two reals in Qt code > > On Thu, Nov 29, 2012 at 6:53 AM, Sean Harmer wrote: >> On Thursday 29 November 2012 15:01:05 Dominik Holland wrote:

Re: [Development] Comparing two reals in Qt code

2012-11-29 Thread Alan Alpert
On Thu, Nov 29, 2012 at 6:53 AM, Sean Harmer wrote: > On Thursday 29 November 2012 15:01:05 Dominik Holland wrote: >> Hi all, >> >> last month i had some performance problems on a QML animation running on >> low end hardware (imx233). >> I debugged that problem and it was caused because of roundin

Re: [Development] Comparing two reals in Qt code

2012-11-29 Thread Thomas Senyk
On Thu, November 29, 2012 14:53:21 Sean Harmer wrote: > On Thursday 29 November 2012 15:01:05 Dominik Holland wrote: > > Hi all, > > > > last month i had some performance problems on a QML animation running on > > low end hardware (imx233). > > I debugged that problem and it was caused because of

Re: [Development] Comparing two reals in Qt code

2012-11-29 Thread Sean Harmer
On Thursday 29 November 2012 15:01:05 Dominik Holland wrote: > Hi all, > > last month i had some performance problems on a QML animation running on > low end hardware (imx233). > I debugged that problem and it was caused because of rounding errors > during the comparison of two reals. > > I fixed

[Development] Comparing two reals in Qt code

2012-11-29 Thread Dominik Holland
Hi all, last month i had some performance problems on a QML animation running on low end hardware (imx233). I debugged that problem and it was caused because of rounding errors during the comparison of two reals. I fixed that problem by replacing the comparison by a qFuzzyCompare() in the Qt4