1--TEST--
2Test return type and value for expected input cosh()
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
14echo "cosh .5  = ";
15var_dump(cosh(0.5));
16
17if (allowed_rounding_error(cosh(0.5),1.1276259652064)){
18    echo "Pass\n";
19}
20else {
21    echo "Fail\n";
22}
23
24echo "cosh -0.5  = ";
25var_dump(cosh(-0.5));
26if (allowed_rounding_error(cosh(-0.5),1.1276259652064)){
27    echo "Pass\n";
28}
29else {
30    echo "Fail\n";
31}
32
33echo "cosh 3  = ";
34var_dump(cosh(3.0));
35if (allowed_rounding_error(cosh(3.0), 10.067661995778)){
36    echo "Pass\n";
37}
38else {
39    echo "Fail\n";
40}
41
42echo "cosh -3  = ";
43var_dump(cosh(-3.0));
44if (allowed_rounding_error(cosh(-3.0), 10.067661995778)){
45    echo "Pass\n";
46}
47else {
48    echo "Fail\n";
49}
50
51?>
52--EXPECTF--
53cosh .5  = float(%f)
54Pass
55cosh -0.5  = float(%f)
56Pass
57cosh 3  = float(%f)
58Pass
59cosh -3  = float(%f)
60Pass
61