summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/08_Types/8.5_The_Number_Type/S8.5_A2.2.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/08_Types/8.5_The_Number_Type/S8.5_A2.2.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/08_Types/8.5_The_Number_Type/S8.5_A2.2.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/08_Types/8.5_The_Number_Type/S8.5_A2.2.js b/external/contributions/Google/sputnik_conformance_modified/08_Types/8.5_The_Number_Type/S8.5_A2.2.js
new file mode 100644
index 000000000..feb5ff2fd
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/08_Types/8.5_The_Number_Type/S8.5_A2.2.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S8.5_A2.2;
+ * @section: 8.5, 7.8.3;
+ * @assertion: Number type represented as the extended precision 64-bit format IEEE 754;
+ * @description: Use 2^53 + 2 number and do some operation with it;
+*/
+
+var x = 9007199254740994.0; /* 2^53 + 2 */
+var y = 1.0 - 1/65536.0;
+var z = x + y;
+var d = z - x;
+
+if (d === 2){
+ $ERROR('#1: var x = 9007199254740994.0; var y = 1.0 - 1/65536.0; var z = x + y; var d = z - x; d !== 2');
+}