Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
A lot of places inside Qt there are custom solutions to common algebra problems, specifically many of which may and do suffer from numerical instabilities. Specifically in places where dealing with geometry and transformations. Classes, like QPointF, QLineF, QPainterPath, QGraphicsView and so on, reinvent the wheel on more than one occasion when dealing with the algebraic part of geometry calculation.
Things like solving linear systems, matrix multiplications, additions, inversions, determinants calculation and so on, are available as ready packages that are stable, efficient and well tested, there's little reason to pass on the opportunity to use such a tool in favor of custom solutions, especially without rigorous testing of the latter verifying their correctness.
Currently linear algebra is done on a case-by-case basis without conscious regard to the numerical stability. As a consequence many of the implementations suffer from instabilities for some inputs, which could be fixed by replacing the custom code with a general solution. One that provides stable and tried-and-tested algorithms and primitives. Even more so relevant as there's no reason to think that the custom code is more efficient than the optimized libraries available.