diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-05 01:01:05 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-05 01:01:06 +0200 |
commit | 327b305e95187fda869c5af407e78a17e0e381cd (patch) | |
tree | fc51c7579a9c1fed3c3993ac2ea68bf9dd32f8bb /src/corelib/global/qfloat16.h | |
parent | da284ef10e0ef80776b9fc9b7bb0e6dc8d71ba63 (diff) | |
parent | a2e718a71abad719ea196e9dc4d90d9267102f54 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
Diffstat (limited to 'src/corelib/global/qfloat16.h')
-rw-r--r-- | src/corelib/global/qfloat16.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h index 4d1aa91349..9a4f1800a4 100644 --- a/src/corelib/global/qfloat16.h +++ b/src/corelib/global/qfloat16.h @@ -94,7 +94,7 @@ public: static constexpr qfloat16 _limit_quiet_NaN() noexcept { return qfloat16(Wrap(0x7e00)); } // Signalling NaN is 0x7f00 inline constexpr bool isNormal() const noexcept - { return b16 == 0 || ((b16 & 0x7c00) && (b16 & 0x7c00) != 0x7c00); } + { return (b16 & 0x7fff) == 0 || ((b16 & 0x7c00) && (b16 & 0x7c00) != 0x7c00); } private: quint16 b16; constexpr inline explicit qfloat16(Wrap nibble) noexcept : b16(nibble.b16) {} @@ -296,7 +296,7 @@ class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)> : public numeric_limits<flo public: /* Treat quint16 b16 as if it were: - uint S: 1; // b16 >> 15 (sign) + uint S: 1; // b16 >> 15 (sign); can be set for zero uint E: 5; // (b16 >> 10) & 0x1f (offset exponent) uint M: 10; // b16 & 0x3ff (adjusted mantissa) |