Debian Codegraph @

js/src/tests/test262/built-ins/Number/EPSILON.js

raw
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 esid: sec-number.epsilon
6 description: >
7 "EPSILON" property of Number
8 info: |
9 20.1.2.1 Number.EPSILON
10
11 The value of Number.EPSILON is the difference between 1 and the smallest value
12 greater than 1 that is representable as a Number value, which is approximately
13 2.2204460492503130808472633361816 x 10-16.
14
15 This property has the attributes { [[Writable]]: false, [[Enumerable]]: false,
16 [[Configurable]]: false }.
17 includes: [propertyHelper.js]
18 ---*/
19
20 assert(
21 Number.EPSILON > 0,
22 "value is greater than 0"
23 );
24 assert(
25 Number.EPSILON < 0.000001,
26 "value is smaller than 0.000001"
27 );
28
29 verifyProperty(Number, "EPSILON", {
30 writable: false,
31 enumerable: false,
32 configurable: false,
33 });
34
35 reportCompare(0, 0);