1--TEST--
2Test return type and value for expected input deg2rad()
3--INI--
4precision = 14
5--FILE--
6<?php
7/*
8 * proto float deg2rad(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
15$arg_0 = 0.0;
16$arg_1 = 90.0;
17$arg_2 = 180.0;
18$arg_3 = 360.0;
19
20
21echo "deg2rad $arg_0 = ";
22$r0 = deg2rad($arg_0);
23var_dump($r0);
24if (allowed_rounding_error($r0 ,0 )) {
25	echo "Pass\n";
26}
27else {
28	echo "Fail\n";
29}
30
31echo "deg2rad $arg_1 = ";
32$r1 = deg2rad($arg_1);
33var_dump($r1);
34if (allowed_rounding_error($r1 ,1.5707963267949 )) {
35	echo "Pass\n";
36}
37else {
38	echo "Fail\n";
39}
40echo "deg2rad $arg_2 = ";
41$r2 = deg2rad($arg_2);
42var_dump($r2);
43if (allowed_rounding_error($r2 ,3.1415926535898 )) {
44	echo "Pass\n";
45}
46else {
47	echo "Fail\n";
48}
49echo "deg2rad $arg_3 = ";
50$r3 = deg2rad($arg_3);
51var_dump($r3);
52if (allowed_rounding_error($r3 ,6.2831853071796 )) {
53	echo "Pass\n";
54}
55else {
56	echo "Fail\n";
57}
58?>
59--EXPECTF--
60deg2rad 0 = float(%f)
61Pass
62deg2rad 90 = float(%f)
63Pass
64deg2rad 180 = float(%f)
65Pass
66deg2rad 360 = float(%f)
67Pass
68