Debian Codegraph @

js/src/tests/test262/built-ins/Number/S9.3.1_A11.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: |
6 The MV of StrUnsignedDecimalLiteral:::. DecimalDigits ExponentPart
7 is the MV of DecimalDigits times 10<sup><small>e-n</small></sup>, where n is
8 the number of characters in DecimalDigits and e is the MV of ExponentPart
9 es5id: 9.3.1_A11
10 description: >
11 Compare Number('.12345e6') with +('12345')*1e1, and
12 Number('.12345e-3') !== Number('12345')*1e-8
13 ---*/
14 assert.sameValue(+('12345')*1e1, 0.12345e6);
15
16 assert.sameValue(
17 Number(".12345e-3"),
18 0.00012345
19 );
20
21 reportCompare(0, 0);