diff options
author | Edward Welbourne <[email protected]> | 2019-09-02 18:36:24 +0200 |
---|---|---|
committer | Edward Welbourne <[email protected]> | 2019-09-04 18:42:55 +0200 |
commit | 893a298a9c66af9aa2a87d9ba5e805967bade405 (patch) | |
tree | d1f976da1971a3dfa186a12c8f15d4bbbfd3609c /src/qml/jsruntime/qv4runtime.cpp | |
parent | f862b3edeb8a96a49a5d12620506d33d5a5aadca (diff) |
Use quiet NaNs instead of signalling ones
I see no good reason why the NaN returned when reading "nan" as a
double should be a signalling one; a quiet one should be just fine.
[ChangeLog][ES][] The NaN obtained by Math.pow(+/-1, +/-infinity) and
(+/-1)**(+/-infinity) is now quiet rather than signalling.
Change-Id: I6b5ea469c17c028328c803f54f2a6d4422a80033
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 8a7cbdfb2a..aaa198c62a 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -2050,7 +2050,7 @@ ReturnedValue Runtime::Exp::call(const Value &base, const Value &exp) double b = base.toNumber(); double e = exp.toNumber(); if (qt_is_inf(e) && (b == 1 || b == -1)) - return Encode(qt_snan()); + return Encode(qt_qnan()); return Encode(pow(b,e)); } |