michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: /** michael@0: File Name: 15.8.1.js michael@0: ECMA Section: 15.8.1.js Value Properties of the Math Object michael@0: 15.8.1.1 E michael@0: 15.8.1.2 LN10 michael@0: 15.8.1.3 LN2 michael@0: 15.8.1.4 LOG2E michael@0: 15.8.1.5 LOG10E michael@0: 15.8.1.6 PI michael@0: 15.8.1.7 SQRT1_2 michael@0: 15.8.1.8 SQRT2 michael@0: Description: verify the values of some math constants michael@0: Author: christine@netscape.com michael@0: Date: 7 july 1997 michael@0: michael@0: */ michael@0: var SECTION = "15.8.1" michael@0: var VERSION = "ECMA_1"; michael@0: startTest(); michael@0: var TITLE = "Value Properties of the Math Object"; michael@0: michael@0: writeHeaderToLog( SECTION + " "+ TITLE); michael@0: michael@0: michael@0: new TestCase( "15.8.1.1", "Math.E", michael@0: 2.7182818284590452354, michael@0: Math.E ); michael@0: michael@0: new TestCase( "15.8.1.1", michael@0: "typeof Math.E", michael@0: "number", michael@0: typeof Math.E ); michael@0: michael@0: new TestCase( "15.8.1.2", michael@0: "Math.LN10", michael@0: 2.302585092994046, michael@0: Math.LN10 ); michael@0: michael@0: new TestCase( "15.8.1.2", michael@0: "typeof Math.LN10", michael@0: "number", michael@0: typeof Math.LN10 ); michael@0: michael@0: new TestCase( "15.8.1.3", michael@0: "Math.LN2", michael@0: 0.6931471805599453, michael@0: Math.LN2 ); michael@0: michael@0: new TestCase( "15.8.1.3", michael@0: "typeof Math.LN2", michael@0: "number", michael@0: typeof Math.LN2 ); michael@0: michael@0: new TestCase( "15.8.1.4", michael@0: "Math.LOG2E", michael@0: 1.4426950408889634, michael@0: Math.LOG2E ); michael@0: michael@0: new TestCase( "15.8.1.4", michael@0: "typeof Math.LOG2E", michael@0: "number", michael@0: typeof Math.LOG2E ); michael@0: michael@0: new TestCase( "15.8.1.5", michael@0: "Math.LOG10E", michael@0: 0.4342944819032518, michael@0: Math.LOG10E); michael@0: michael@0: new TestCase( "15.8.1.5", michael@0: "typeof Math.LOG10E", michael@0: "number", michael@0: typeof Math.LOG10E); michael@0: michael@0: new TestCase( "15.8.1.6", michael@0: "Math.PI", michael@0: 3.14159265358979323846, michael@0: Math.PI ); michael@0: michael@0: new TestCase( "15.8.1.6", michael@0: "typeof Math.PI", michael@0: "number", michael@0: typeof Math.PI ); michael@0: michael@0: new TestCase( "15.8.1.7", michael@0: "Math.SQRT1_2", michael@0: 0.7071067811865476, michael@0: Math.SQRT1_2); michael@0: michael@0: new TestCase( "15.8.1.7", michael@0: "typeof Math.SQRT1_2", michael@0: "number", michael@0: typeof Math.SQRT1_2); michael@0: michael@0: new TestCase( "15.8.1.8", michael@0: "Math.SQRT2", michael@0: 1.4142135623730951, michael@0: Math.SQRT2 ); michael@0: michael@0: new TestCase( "15.8.1.8", michael@0: "typeof Math.SQRT2", michael@0: "number", michael@0: typeof Math.SQRT2 ); michael@0: michael@0: new TestCase( SECTION, michael@0: "var MATHPROPS='';for( p in Math ){ MATHPROPS +=p; };MATHPROPS", michael@0: "", michael@0: eval("var MATHPROPS='';for( p in Math ){ MATHPROPS +=p; };MATHPROPS") ); michael@0: michael@0: test();