aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-09-02 18:36:24 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-09-04 18:42:55 +0200
commit893a298a9c66af9aa2a87d9ba5e805967bade405 (patch)
treed1f976da1971a3dfa186a12c8f15d4bbbfd3609c /src/qml/jsruntime/qv4runtime.cpp
parentf862b3edeb8a96a49a5d12620506d33d5a5aadca (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 <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp2
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));
}