qt5base-lts/tests/auto/corelib
Thiago Macieira 8153386397 Enhance precision of the FP conversion to strings in QVariant
This now guarantees that doing a round-trip from an FP number to string
and back to number results in the same number. This change is required
because DBL_DIG and FLT_DIG don't have the meaning that we were
expecting them to, here: they mean the minimum number of digits of
precision in decimal (i.e., changing the last decimal will always cause
the FP number to change). We need the maximum number: there is one
change in the last decimal place that causes the FP number to change.

IEEE 754 single-precision has 24 binary digits and double precision has
53 binary digits in their mantissa. To convert that to decimal, multiply
by the number of decimal digits a binary digit represents (log2(10) =
0.3), then add one for the rounding and one more digit for the actual
precision we want. That is, for floats we now ask for 9 digits and for
double, 17 decimal digits.

Task-number: QTBUG-42574
Change-Id: Ic78beb60a218f75322f832d33d63fd84e7a65b65
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-11-20 05:46:18 +01:00
..
animation Update license headers and add new license files 2014-09-24 12:26:19 +02:00
codecs Fix doc about the list of supported codecs 2014-10-24 22:23:58 +02:00
global Use Q_DECL_RELAXED_CONSTEXPR in QFlags 2014-10-31 09:54:15 +01:00
io Further limit the sparse file testing on OS X 2014-10-22 23:00:41 +02:00
itemmodels Update license headers and add new license files 2014-09-24 12:26:19 +02:00
json Add conversion between QVariantHash and QJsonObject 2014-10-30 12:14:42 +01:00
kernel Enhance precision of the FP conversion to strings in QVariant 2014-11-20 05:46:18 +01:00
mimetypes Update license headers and add new license files 2014-09-24 12:26:19 +02:00
plugin Update license headers and add new license files 2014-09-24 12:26:19 +02:00
statemachine tst_QState: fix memleaks 2014-10-19 13:18:12 +02:00
thread tst_QThreadPool: fix memleak 2014-10-19 13:18:07 +02:00
tools Add a inline QVector::append(const QVector &) overload 2014-11-06 11:33:52 +01:00
xml Update license headers and add new license files 2014-09-24 12:26:19 +02:00
corelib.pro iOS: Enable building of basic tests 2014-01-22 12:35:17 +01:00