keith_miller@apple.com | bcc77f2 | 2016-07-15 06:03:25 +0000 | [diff] [blame] | 1 | // Copyright (C) 2016 The V8 Project authors. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | es6id: 20.1.2.1 |
| 6 | esid: sec-number.epsilon |
| 7 | description: > |
| 8 | "EPSILON" property of Number |
| 9 | info: > |
| 10 | 20.1.2.1 Number.EPSILON |
| 11 | |
| 12 | The value of Number.EPSILON is the difference between 1 and the smallest value |
| 13 | greater than 1 that is representable as a Number value, which is approximately |
| 14 | 2.2204460492503130808472633361816 x 10-16. |
| 15 | |
| 16 | This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, |
| 17 | [[Configurable]]: false }. |
| 18 | includes: [propertyHelper.js] |
| 19 | ---*/ |
| 20 | |
| 21 | assert( |
| 22 | Number.EPSILON > 0, |
| 23 | "value is greater than 0" |
| 24 | ); |
| 25 | assert( |
| 26 | Number.EPSILON < 0.000001, |
| 27 | "value is smaller than 0.000001" |
| 28 | ); |
| 29 | |
| 30 | verifyNotEnumerable(Number, "EPSILON"); |
| 31 | verifyNotWritable(Number, "EPSILON"); |
| 32 | verifyNotConfigurable(Number, "EPSILON"); |