On Aug 20, 2011, at 12:49 AM, ext Thiago Macieira wrote:

> On Friday, 19 de August de 2011 20:46:32 [email protected] wrote:
>> In general, we have discussed dropping the concept of qreal and sticking to
>> the native C++ types. It is a pain to develop something on desktop and have
>> the sizeof(qreal) change behind the scenes or to have an algorithm you
>> developed suddenly become numerically unstable when ported to device. We've
>> been thinking it is better to be explicit.
> 
> Every time I meet someone from Canonical, they also ask me to drop the 
> distinction.
> 
> The following code usually works fine on the desktop:
> 
>       qMax(1.0, someQRealFunction());
> 
> but on embedded platforms with qreal==float, it breaks.

I have lost count on how many times I've had to fix this :)

> Sure, we can fix it for 
> qMin, qMax, qBound, but there are plenty more template functions to be fixed.
> 
> Unfortunately, the argument to the contrary is that double-precision floating 
> point on the ARM Cortex-A8 is still much worse than single-precision -- it's 
> even worse than on ARM11. Only on the A9 is the performance acceptable.
> 

I would think this is fine though, double will be used so seldom that in 
practice it won't impact performance much.

Both QML Scene Graph and Qt3D use primarily floats for the vertex data and 
other parameters, for instance.

-
Gunnar

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to