File tree Expand file tree Collapse file tree
test/built-ins/Number/MIN_VALUE Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Copyright (C) 2026 Luna Pfeiffer. All rights reserved.
2+ // This code is governed by the BSD license found in the LICENSE file.
3+
4+ /*---
5+ esid: sec-number.min_value
6+ description: >
7+ Number.MIN_VALUE is approximately 5e-324. We can't directly compare it as the spec states:
8+
9+ In the IEEE 754-2019 double precision binary representation, the smallest possible value is a denormalized number.
10+ If an implementation does not support denormalized values, the value of Number.MIN_VALUE must be the smallest
11+ non-zero positive value that can actually be represented by the implementation.
12+ ---*/
13+
14+
15+ assert . sameValue ( typeof Number . MIN_VALUE , "number" , "Number.MIN_VALUE should be a number" ) ;
16+ assert ( Number . MIN_VALUE > 0 , "Number.MIN_VALUE must be positive" ) ;
17+
18+ assert ( Number . MIN_VALUE < Number . EPSILON , "Number.MIN_VALUE should be smaller than Number.EPSILON" )
19+
20+ assert . sameValue ( Number . MIN_VALUE / 2 , 0 , "Number.MIN_VALUE divided by 2 should underflow to 0" ) ;
You can’t perform that action at this time.
0 commit comments