michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * The MV of StrUnsignedDecimalLiteral::: DecimalDigits. DecimalDigits ExponentPart michael@0: * is (the MV of the first DecimalDigits plus (the MV of the second DecimalDigits times michael@0: * 10-n)) times 10e, where n is the number michael@0: * of characters in the second DecimalDigits and e is the MV of ExponentPart michael@0: * michael@0: * @path ch09/9.3/9.3.1/S9.3.1_A9.js michael@0: * @description Compare Number('1234.5678e9') with (Number('1234')+(Number('5678')*1e-4))*1e9, michael@0: * and +('1234.5678e-9') with (Number('1234')+(Number('5678')*1e-4))*1e-9 michael@0: */ michael@0: michael@0: // CHECK#1 michael@0: if (Number("1234.5678e9") !== (Number("1234")+(Number("5678")*1e-4))*1e9) { michael@0: $ERROR('#1: Number("1234.5678e9") === (Number("1234")+(Number("5678")*1e-4))*1e9'); michael@0: } michael@0: michael@0: // CHECK#2 michael@0: if (+("1234.5678e-9") !== (Number("1234")+(Number("5678")*1e-4))*1e-9) { michael@0: $ERROR('#2: +("1234.5678e-9") === (Number("1234")+(Number("5678")*1e-4))*1e-9'); michael@0: } michael@0: