1--TEST--
2Test return type and value for expected input asin()
3--INI--
4precision = 14
5--FILE--
6<?php
7/*
8 * Function is implemented in ext/standard/math.c
9*/
10
11$file_path = __DIR__;
12require($file_path."/allowed_rounding_error.inc");
13
14
15//output is in degrees
16
17echo "asin .5  = ";
18$asinv1 = 360.0  * asin(0.5) / (2.0 * M_PI );
19var_dump($asinv1);
20if (allowed_rounding_error($asinv1 ,30 )) {
21    echo "Pass\n";
22}
23else {
24    echo "Fail\n";
25}
26
27echo "asin 0.86602540378444 = ";
28$asinv2 = 360.0  * asin(0.86602540378444) / (2.0 * M_PI );
29var_dump($asinv2);
30if (allowed_rounding_error($asinv2 ,60 )) {
31    echo "Pass\n";
32}
33else {
34    echo "Fail\n";
35}
36
37echo "asin 1.0 = ";
38$asinv3 = 360.0  * asin(1.0) / (2.0 * M_PI );
39var_dump($asinv3);
40if (allowed_rounding_error($asinv3 ,90 )) {
41    echo "Pass\n";
42}
43else {
44    echo "Fail\n";
45}
46
47
48echo "asin 0.0 = ";
49$asinv4 = 360.0  * asin(0.0) / (2.0 * M_PI );
50var_dump($asinv4);
51if (allowed_rounding_error($asinv4 ,0 )) {
52    echo "Pass\n";
53}
54else {
55    echo "Fail\n";
56}
57
58?>
59--EXPECTF--
60asin .5  = float(%f)
61Pass
62asin 0.86602540378444 = float(%f)
63Pass
64asin 1.0 = float(%f)
65Pass
66asin 0.0 = float(%f)
67Pass
68