| 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 |
|
| 15 |
// CHECK#1 |
| 16 |
if (Number(".12345e6") !== +("12345") * 1e1) { |
| 17 |
$ERROR('#1: Number(".12345e6") === +("12345")*1e1'); |
| 18 |
} |
| 19 |
|
| 20 |
// CHECK#2 |
| 21 |
if (Number(".12345e-3") !== Number("12345") * 1e-8) { |
| 22 |
$ERROR('#2: Number(".12345e-3") === Number("12345")*1e-8'); |
| 23 |
} |