1--TEST--
2Test return type and value for expected input atan()
3--INI--
4precision = 14
5--FILE--
6<?php
7/*
8 * proto float atan(float number)
9 * Function is implemented in ext/standard/math.c
10*/
11
12$file_path = dirname(__FILE__);
13require($file_path."/allowed_rounding_error.inc");
14
15echo "atan 1.7320508075689 = ";
16$atan1 = 360 * atan(1.7320508075689) / (2.0 * M_PI);
17var_dump($atan1);
18if (allowed_rounding_error($atan1 ,60 )) {
19	echo "Pass\n";
20}
21else {
22	echo "Fail\n";
23}
24
25echo "atan 0.57735026918963 = ";
26$atan2 = 360 * atan(0.57735026918963) / (2.0 * M_PI);
27var_dump($atan2);
28if (allowed_rounding_error($atan2 ,30 )) {
29	echo "Pass\n";
30}
31else {
32	echo "Fail\n";
33}
34
35?>
36--EXPECTF--
37atan 1.7320508075689 = float(%f)
38Pass
39atan 0.57735026918963 = float(%f)
40Pass
41