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