summaryrefslogtreecommitdiff
path: root/test/suite/sputnik/Conformance/15_Native/15.8_The_Math_Object/15.8.2_Function_Properties_of_the_Math_Object/15.8.2.4_atan/S15.8.2.4_A4.js
blob: 859d0db9b3a34bd504021aa3cc3c90a6301aaf89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * @name: S15.8.2.4_A4;
 * @section: 15.8.2.4;
 * @assertion: If x is +Infinity, Math.atan(x) is an implementation-dependent approximation to +PI/2;
 * @description: Checking if Math.atan(+Infinity) is an approximation to +PI/2;
 */
 
$INCLUDE("math_precision.js");
$INCLUDE("math_isequal.js"); 
 
// CHECK#1

var x = +Infinity;
if (!isEqual(Math.atan(x),Math.PI/2))
{
	$ERROR("#1: '!isEqual(Math.atan(+Infinity), Math.PI/2)'");
}