qt6-bb10/tests/auto/corelib
Edward Welbourne b08368d99f Add qHypot() to qmath.h, exposing and extending std::hypot()
We have plenty of places where we add some squares and take a square
root; this may be done more accurately and faster by hypot().
Introduce QHypotHelper to handle hypot with more than 3 parameters,
and with 3 when the C++17 version is missing (which it never should
be). Include an overload taking arbitrarily many valus and ensure that
we can use qHypot() with qfloat16.  Illustrate with some example uses,
add some tests.

[ChangeLog][QtCore][QMath] Header <QMath> now provides qHypot(), an
implementation of std::hypot() taking arbitrarily many numeric values,
including support for qfloat16, while avoiding the overflow and
underflow problems that arise when naively taking the square root of a
sum of squares.

Change-Id: Ia4e3913fe83fc27d17d8e7f1a52f03ad445c1fed
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-01-27 15:00:57 +01:00
..
animation Port QPauseAnimation to the new property system 2021-01-26 21:47:47 +01:00
global Remove the QT_CMAKE_BUILD preprocessor define 2021-01-22 19:22:15 +01:00
io Android: skip tst_QFile::moveToTrash() 2021-01-19 13:17:55 +00:00
itemmodels Make sure QMimeData is fully declared 2021-01-11 16:57:41 +01:00
kernel Add qHypot() to qmath.h, exposing and extending std::hypot() 2021-01-27 15:00:57 +01:00
mimetypes Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
plugin Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
serialization QJsonObject::take: add missing detach() call 2021-01-27 05:11:39 +00:00
text QRegularExpression: add move constructor 2021-01-26 17:20:01 +01:00
thread Port QThreadPool to the new property system 2021-01-27 15:00:56 +01:00
time Correct string comparison in Android's IANA ID matching code 2021-01-18 15:55:15 +01:00
tools Extend alignment of QArrayData to std::max_align_t in allocation 2021-01-26 08:01:27 +00:00
CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00