Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75879

Improve floating point stability within Qt

    XMLWordPrintable

Details

    • All

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            kshegunov Konstantin Shegunov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes